From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
In ubuntu 13.10, package does not have architecture method,
using pkg.architecture() raises error.
workaround by using _pkg.architecture.
dir(pkg) output:
['_Package__set_candidate', '__class__', '__delattr__',
'__dict__', '__doc__', '__format__', '__getattribute__',
'__hash__', '__init__', '__lt__', '__module__',
'__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
'__sizeof__', '__str__', '__subclasshook__',
'__weakref__',
'_changelog', '_pcache', '_pkg', 'candidate',
'commit', 'essential',
'fullname', 'get_changelog', 'id', 'installed',
'installed_files',
'is_auto_installed', 'is_auto_removable', 'is_inst_broken',
'is_installed', 'is_now_broken', 'is_upgradable',
'mark_auto',
'mark_delete', 'mark_install', 'mark_keep',
'mark_upgrade', 'marked_delete',
'marked_downgrade', 'marked_install', 'marked_keep',
'marked_reinstall',
'marked_upgrade', 'name', 'section', 'shortname',
'versions']
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/swupdate.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/swupdate.py b/src/kimchi/swupdate.py
index 9489900..e2fdc29 100644
--- a/src/kimchi/swupdate.py
+++ b/src/kimchi/swupdate.py
@@ -209,9 +209,10 @@ class AptUpdate(object):
for pkg in self._pkgs:
package = {'package_name': pkg.shortname,
'version': pkg.candidate.version,
- 'arch': pkg.architecture(),
+ 'arch': pkg._pkg.architecture,
'repository': pkg.candidate.origins[0].label}
pkg_list.append(package)
+
return pkg_list
--
1.8.3.2