fix Package_constPtr AttributeError: status
authorGui Chen <gui.chen@intel.com>
Mon, 9 Jun 2014 02:33:48 +0000 (22:33 -0400)
committeradmin <yuhuan.yang@samsung.com>
Thu, 4 Feb 2016 10:19:15 +0000 (18:19 +0800)
actually the modified 'item' should be PoolItem, which has 'status',
instead of Package

Change-Id: Ib29bc770281a5d32773a2165c65cc6c4431cb51b
Signed-off-by: Gui Chen <gui.chen@intel.com>
plugins/backend/zypppkgmgr.py

index 1c5f867..e1c7641 100644 (file)
@@ -236,7 +236,7 @@ class Zypp(BackendPlugin):
             obspkg = self.whatObsolete(item)
             if arch:
                 if arch == str(item.arch()):
-                    item.status().setToBeInstalled (zypp.ResStatus.USER)
+                    pitem.status().setToBeInstalled (zypp.ResStatus.USER)
             else:
                 markPoolItem(obspkg, pitem)
             if not ispattern: