diff options
author | Gui Chen <gui.chen@intel.com> | 2012-12-09 13:49:38 +0800 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2012-12-12 19:33:44 +0800 |
commit | aefee61849eb803f1fcac61046c2e480c8704729 (patch) | |
tree | f02e60967bbc179d6e87f6c385033221420cfb6d | |
parent | f2f73b698a084adb9cdfafa704f157e29e5fbbec (diff) | |
download | mic-aefee61849eb803f1fcac61046c2e480c8704729.tar.gz mic-aefee61849eb803f1fcac61046c2e480c8704729.tar.bz2 mic-aefee61849eb803f1fcac61046c2e480c8704729.zip |
fix showing incorrect total install number in some case
Signed-off-by: Gui Chen <gui.chen@intel.com>
-rw-r--r-- | mic/utils/rpmmisc.py | 5 |
1 files 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?") |