
From: Aline Manera <alinefm@br.ibm.com> It is needed to always get the correct information from apt-get. Otherwise, even after updating packages the same packages will be listed to be updated as they are kept in the apt-get instance. Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- src/kimchi/swupdate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kimchi/swupdate.py b/src/kimchi/swupdate.py index 356ec52..625b091 100644 --- a/src/kimchi/swupdate.py +++ b/src/kimchi/swupdate.py @@ -179,16 +179,16 @@ class AptUpdate(object): """ def __init__(self): self._pkgs = {} - self._apt_cache = getattr(__import__('apt'), 'Cache')() self.update_cmd = ['apt-get', 'upgrade', '-y'] def _refreshUpdateList(self): """ Update the list of packages to be updated in the system. """ - self._apt_cache.update() - self._apt_cache.upgrade() - self._pkgs = self._apt_cache.get_changes() + apt_cache = getattr(__import__('apt'), 'Cache')() + apt_cache.update() + apt_cache.upgrade() + self._pkgs = apt_cache.get_changes() def getPackagesList(self): """ -- 1.7.10.4