Package: xen
Version: 4.0.1-1
Tags: patch

Here is a patch to get rid off the obvious problem with string exceptions, and to change to rules to build with python2.6.

diff -Nru xen-4.0.1/debian/changelog xen-4.0.1/debian/changelog
--- xen-4.0.1/debian/changelog  2010-09-03 17:16:04.000000000 +0200
+++ xen-4.0.1/debian/changelog  2010-09-12 14:10:26.000000000 +0200
@@ -1,3 +1,12 @@
+xen (4.0.1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Replace build-dependency on python2.5-dev with python2.6-dev.
+    Closes: #596316.
+  * Replace string exceptions with ValueError's. Closes: #585372.
+
+ -- Matthias Klose <[email protected]>  Sun, 12 Sep 2010 13:48:08 +0200
+
 xen (4.0.1-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru xen-4.0.1/debian/control xen-4.0.1/debian/control
--- xen-4.0.1/debian/control    2010-09-03 17:18:05.000000000 +0200
+++ xen-4.0.1/debian/control    2010-09-12 14:10:35.000000000 +0200
@@ -4,9 +4,9 @@
 Maintainer: Debian Xen Team <[email protected]>
 Uploaders: Julien Danjou <[email protected]>, Guido Trotter 
<[email protected]>, Bastian Blank <[email protected]>
 Standards-Version: 3.8.4
-Build-Depends: debhelper (>> 7), lsb-release, quilt, python2.5-dev, 
python-support, bcc, gcc-multilib, e2fslibs-dev, iasl, libncurses5-dev, 
uuid-dev, zlib1g-dev
+Build-Depends: debhelper (>> 7), lsb-release, quilt, python2.6-dev, 
python-support, bcc, gcc-multilib, e2fslibs-dev, iasl, libncurses5-dev, 
uuid-dev, zlib1g-dev
 Build-Depends-Indep: graphviz, gs-common, texlive-fonts-recommended, 
texlive-latex-recommended
-XS-Python-Version: 2.5
+XS-Python-Version: 2.6
 
 Package: xen-docs-4.0
 Architecture: all
diff -Nru xen-4.0.1/debian/control.md5sum xen-4.0.1/debian/control.md5sum
--- xen-4.0.1/debian/control.md5sum     2010-09-03 17:18:05.000000000 +0200
+++ xen-4.0.1/debian/control.md5sum     2010-09-12 14:10:35.000000000 +0200
@@ -1,8 +1,8 @@
-62491ef1206240a88e09a4c524798439  debian/changelog
+3dde2ed09f0da529adcf564e295b544a  debian/changelog
 24f2598a23e30264aea4a983d5d19eec  debian/bin/gencontrol.py
 ee1ccd7bf0932a81ca221cab08347614  debian/templates/control.hypervisor.in
 e4335ab10e217a12328cdf123473ed37  debian/templates/control.main.in
-d0b2fdb5ba20b9ae0a33f7ac843744fc  debian/templates/control.source.in
+a35156fe9da59e4eee2d014f10383d2f  debian/templates/control.source.in
 52a1288ece001f683dca62e9a325fd51  debian/templates/control.utils.in
 a15fa64ce6deead28d33c1581b14dba7  debian/templates/xen-hypervisor.postinst.in
 22492e0565a4754b5e008ca7cac871da  debian/templates/xen-hypervisor.postrm.in
diff -Nru xen-4.0.1/debian/patches/series xen-4.0.1/debian/patches/series
--- xen-4.0.1/debian/patches/series     2010-08-17 23:14:56.000000000 +0200
+++ xen-4.0.1/debian/patches/series     2010-09-12 16:00:32.000000000 +0200
@@ -47,3 +47,4 @@
 tools-xenmon-install.diff
 
 tools-python-shebang.diff
+tools-python2.6.diff
diff -Nru xen-4.0.1/debian/patches/tools-python2.6.diff 
xen-4.0.1/debian/patches/tools-python2.6.diff
--- xen-4.0.1/debian/patches/tools-python2.6.diff       1970-01-01 
01:00:00.000000000 +0100
+++ xen-4.0.1/debian/patches/tools-python2.6.diff       2010-09-12 
16:00:12.000000000 +0200
@@ -0,0 +1,48 @@
+Description: Replace python string exceptions with ValueError exceptions
+Author: Matthias Klose <[email protected]>
+Bug-Debian: http://bugs.debian.org/585372
+
+--- xen-4.0.1.orig/tools/python/xen/util/bugtool.py
++++ xen-4.0.1/tools/python/xen/util/bugtool.py
+@@ -139,7 +139,7 @@ def getBugTitle(bug):
+     finally:
+         f.close()
+ 
+-    raise "Could not find title of bug %d!" % bug
++    raise ValueError("Could not find title of bug %d!" % bug)
+ 
+ 
+ def send(bug, conn, fd, filename, username, password):
+--- xen-4.0.1.orig/tools/python/xen/xend/XendBase.py
++++ xen-4.0.1/tools/python/xen/xend/XendBase.py
+@@ -114,7 +114,7 @@ class XendBase:
+             # In OSS, ref == uuid
+             return uuid
+         else:
+-            raise "Big Error.. TODO!"
++            raise ValueError("Big Error.. TODO!")
+ 
+     def get_all_records(cls):
+         return dict([(inst.get_uuid(), inst.get_record())
+--- xen-4.0.1.orig/tools/python/xen/xm/xenapi_create.py
++++ xen-4.0.1/tools/python/xen/xm/xenapi_create.py
+@@ -702,7 +702,7 @@ class sxp2xml:
+                 vm.attributes['security_label'] = \
+                                     
security.set_security_label(sec_data[0][1][1],sec_data[0][2][1])
+             except Exception, e:
+-                raise "Invalid security data format: %s" % str(sec_data)
++                raise ValueError("Invalid security data format: %s" % 
str(sec_data))
+ 
+         # Make the name tag
+ 
+--- xen-4.0.1.orig/tools/python/xen/xm/main.py
++++ xen-4.0.1/tools/python/xen/xm/main.py
+@@ -2616,7 +2616,7 @@ def xm_network_attach(args):
+                              for ref, record in server.xenapi.network
+                              .get_all_records().items()])
+             if bridge not in networks.keys():
+-                raise "Unknown bridge name!"
++                raise ValueError("Unknown bridge name!")
+             return networks[bridge]
+ 
+         vif_conv = {
diff -Nru xen-4.0.1/debian/templates/control.source.in 
xen-4.0.1/debian/templates/control.source.in
--- xen-4.0.1/debian/templates/control.source.in        2010-06-21 
17:16:15.000000000 +0200
+++ xen-4.0.1/debian/templates/control.source.in        2010-09-12 
13:47:15.000000000 +0200
@@ -4,7 +4,7 @@
 Uploaders: Julien Danjou <[email protected]>, Guido Trotter 
<[email protected]>, Bastian Blank <[email protected]>
 Build-Depends:
  debhelper (>> 7), lsb-release, quilt,
- python2.5-dev, python-support,
+ python2.6-dev, python-support,
  bcc,
  gcc-multilib,
  e2fslibs-dev,
@@ -14,5 +14,5 @@
  zlib1g-dev
 Build-Depends-Indep: graphviz, gs-common, texlive-fonts-recommended, 
texlive-latex-recommended
 Standards-Version: 3.8.4
-XS-Python-Version: 2.5
+XS-Python-Version: 2.6
 

Reply via email to