[libguestfs] Add upstream patch to fix GObject/Javascript tests.
Richard W.M. Jones
rjones at fedoraproject.org
Wed Jun 27 13:20:09 UTC 2012
commit 45f9b98026b812ce8a6ce382a8e484e74b333cd7
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Wed Jun 27 14:20:04 2012 +0100
Add upstream patch to fix GObject/Javascript tests.
...dtests-gjs-exception-behaviour-changed-fi.patch | 32 ++++++++++++++++++++
libguestfs.spec | 9 ++++-
2 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/0001-gobject-bindtests-gjs-exception-behaviour-changed-fi.patch b/0001-gobject-bindtests-gjs-exception-behaviour-changed-fi.patch
new file mode 100644
index 0000000..984db2a
--- /dev/null
+++ b/0001-gobject-bindtests-gjs-exception-behaviour-changed-fi.patch
@@ -0,0 +1,32 @@
+From 6afb7336e33dc28c4fd1a4545a8298ee36c10723 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Wed, 27 Jun 2012 10:54:02 +0100
+Subject: [PATCH] gobject: bindtests: gjs exception behaviour changed, fix
+ test.
+
+When libguestfs calls 'error (g, "error")', gjs in F17 throws
+error.message == "Error invoking Guestfs.test0rinterr: error"
+
+In F18, error.message is simply the string "error".
+
+Fix the test so it works for both cases.
+---
+ gobject/bindtests-manual.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gobject/bindtests-manual.js b/gobject/bindtests-manual.js
+index 84a1546..8f4ef15 100644
+--- a/gobject/bindtests-manual.js
++++ b/gobject/bindtests-manual.js
+@@ -26,7 +26,7 @@ function check_error(f) {
+ g[f]();
+ } catch (error) {
+ threw = true;
+- if (!error.message.match(/: error$/)) {
++ if (!error.message.match(/error$/)) {
+ print(f + " threw unexpected error: " + error.message);
+ fail = true;
+ }
+--
+1.7.10.2
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 293c4dc..c737683 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -22,7 +22,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.19.13
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: Development/Libraries
URL: http://libguestfs.org/
@@ -40,6 +40,9 @@ BuildRequires: autoconf, automake, libtool, gettext-devel
# patch.
Patch4: libguestfs-1.19.2-remove-udev-from-packagelist.patch
+# Upstream patch to fix GObject/Javascript tests.
+Patch5: 0001-gobject-bindtests-gjs-exception-behaviour-changed-fi.patch
+
%if 0%{?rhel} >= 7
ExclusiveArch: x86_64
%endif
@@ -683,6 +686,7 @@ autoreconf -i
%endif
%patch4 -p1
+%patch5 -p1
mkdir -p daemon/m4
@@ -1037,8 +1041,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
-* Wed Jun 27 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.13-1
+* Wed Jun 27 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.13-2
- New upstream version 1.19.13.
+- Add upstream patch to fix GObject/Javascript tests.
* Tue Jun 26 2012 Richard W.M. Jones <rjones at redhat.com> - 1:1.19.12-1
- New upstream version 1.19.12.
More information about the scm-commits
mailing list