[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#776132: unblock: rhn-client-tools/1.8.26-4



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package rhn-client-tools

Due to a change in the xmlrpc library rhnlib threw a backtrace
while transferring the installed packages list to the spacewalk
server, rendering the whole spacewalk integration more or less
useless as soon as you started using multiarch.
As multiarch is a very common thing these days this in a RC
issue in my opinion.

Reason for the problem was the installTime function in
rhn-client-tools which returned None as timestamp for multiarch
packages (which xmlrpclib didn't want to send over the wire
anymore).

1.8.26-4 fixes this problem. diff is attached.


unblock rhn-client-tools/1.8.26-4


Thanks,

Bernd

-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F
diff --git a/debian/changelog b/debian/changelog
index fba8c8e..c8ee7b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+rhn-client-tools (1.8.26-4) unstable; urgency=medium
+
+  * [e3525938] Fix installTime function for multiarch.
+    This should avoid to send None as timestamp via
+    xmlrpc, which resulted in a traceback due to changes in
+    xmlrpc, breaking spacewalk support.
+    Thanks to Klaas Demter and Philipp Born (Closes: #728365)
+
+ -- Bernd Zeimetz <bzed@debian.org>  Sat, 24 Jan 2015 09:39:24 +0100
+
 rhn-client-tools (1.8.26-3) unstable; urgency=medium
 
   * [11430f4f] Merge branch 'master' of
diff --git a/debian/patches/installTime_multiarch_fix b/debian/patches/installTime_multiarch_fix
new file mode 100644
index 0000000..3ca70dc
--- /dev/null
+++ b/debian/patches/installTime_multiarch_fix
@@ -0,0 +1,32 @@
+--- a/src/up2date_client/debUtils.py
++++ b/src/up2date_client/debUtils.py
+@@ -34,12 +34,14 @@ def parseVRE(version):
+         release = tmp[-1]
+     return version, release, epoch
+ 
+-def installTime(pkg_name):
+-    path = '/var/lib/dpkg/info/%s.list' % pkg_name
+-    if os.path.isfile(path):
+-       return os.path.getmtime(path)
+-    else:
+-       return None
++def installTime(pkg_name, arch=None):
++    paths = ['/var/lib/dpkg/info/%s.list' % (pkg_name,)]
++    if arch:
++        paths.append('/var/lib/dpkg/info/%s:%s.list' % (pkg_name, arch))
++    for path in paths:
++        if os.path.isfile(path):
++           return os.path.getmtime(path)
++    return None
+ 
+ #FIXME: Using Apt cache might not be an ultimate solution.
+ # It could be better to parse /var/lib/dpkg/status manually.
+@@ -70,7 +72,7 @@ def getInstalledPackageList(msgCallback
+             'version': version,
+             'release': release,
+             'arch': pkg.installed.architecture + '-deb',
+-            'installtime': installTime(pkg.name)
++            'installtime': installTime(pkg.name, pkg.installed.architecture)
+             }
+         pkg_list.append(package)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..7a8b14e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+installTime_multiarch_fix

Reply to: