From aefee61849eb803f1fcac61046c2e480c8704729 Mon Sep 17 00:00:00 2001 From: Gui Chen Date: Sun, 9 Dec 2012 13:49:38 +0800 Subject: fix showing incorrect total install number in some case Signed-off-by: Gui Chen --- mic/utils/rpmmisc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mic/utils/rpmmisc.py b/mic/utils/rpmmisc.py index c9c2ba7..5cd7b46 100644 --- a/mic/utils/rpmmisc.py +++ b/mic/utils/rpmmisc.py @@ -187,8 +187,9 @@ class RPMInstallCallback: handle = self._makeHandle(hdr) fd = os.open(rpmloc, os.O_RDONLY) self.callbackfilehandles[handle]=fd - self.total_installed += 1 - self.installed_pkg_names.append(hdr['name']) + if hdr['name'] not in self.installed_pkg_names: + self.installed_pkg_names.append(hdr['name']) + self.total_installed += 1 return fd else: self._localprint("No header - huh?") -- cgit v1.2.3