Hello
Ubuntu 12.04 has some difference with upstream debian with multiarch
packages.
When you try to add a system to spacewalk it will raise a typeError.
After investigating the issue it seems that the package name as listed
with dpkg -l has packages without the packagename.list file in
/var/lib/dpkg/info/ e.g. e2fslibs. The file debUtils.py from rhn-client
looks for this file to determine the installtime (dpkg does not have
this info in its package database), but on Ubuntu 12.04 you can have the
package e2fslibs bot not the file e2fslibs.list file but the filename is
e2fslibs:amd64.list.
https://bugs.launchpad.net/bugs/1020833
#dpkg -l|grep e2fslibs
ii e2fslibs 1.42-1ubuntu2 ext2/ext3/ext4 file
system libraries
#ls /var/lib/dpkg/info/e2fslibs*
/var/lib/dpkg/info/e2fslibs:amd64.list
/var/lib/dpkg/info/e2fslibs:amd64.postinst
/var/lib/dpkg/info/e2fslibs:amd64.shlibs
/var/lib/dpkg/info/e2fslibs:amd64.md5sums
/var/lib/dpkg/info/e2fslibs:amd64.postrm
/var/lib/dpkg/info/e2fslibs:amd64.symbols
The filenames for packages with e.g. the name gcc-4.6-base:i386 does
have the correct list file in /var/lib/dpkg/info/, but packages without
this arch extension is mostly packagename:amd64.list
An easy solution would be to check for the packagename.list then
packagename:amd64.list and so on.
e.g.
file: /usr/share/rhn/up2date_client/debUtils.py
def installTime(pkg_name):
path = '/var/lib/dpkg/info/%s.list' % pkg_name
if os.path.isfile(path):
return os.path.getmtime(path)
path = '/var/lib/dpkg/info/%s:amd64.list' % pkg_name
if os.path.isfile(path):
return os.path.getmtime(path)
path = '/var/lib/dpkg/info/%s:i386.list' % pkg_name
if os.path.isfile(path):
return os.path.getmtime(path)
else:
print pkg_name
return None
(it can also be to return 0 if the list file has not been found).
After this change Ubuntu 12.04 works as expected without a typeError
ps: a while back i also posted the package python-hwdata which adds the
system info to the spacewalk database, without this you wil not have hw
info.
https://www.redhat.com/archives/spacewalk-devel/2012-July/msg00018.html
Regards
William
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel