[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Use a method yum provides, rather than inventing our own.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Use a method yum provides, rather than inventing our own.
- Date: Wed, 8 Jul 2009 17:24:15 -0400
---
yuminstall.py | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/yuminstall.py b/yuminstall.py
index 623911d..478b22b 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -743,17 +743,12 @@ class AnacondaYum(YumSorter):
downloadpkgs = []
totalSize = 0
totalFiles = 0
- for txmbr in self.tsInfo.getMembers():
- if txmbr.ts_state in ['i', 'u']:
- po = txmbr.po
- else:
- continue
-
- if po:
- totalSize += int(po.returnSimple("installedsize")) / 1024
- for filetype in po.returnFileTypes():
- totalFiles += len(po.returnFileEntries(ftype=filetype))
- downloadpkgs.append(po)
+ for txmbr in self.tsInfo.getMembersWithState(output_states=TS_INSTALL_STATES):
+ if txmbr.po:
+ totalSize += int(txmbr.po.returnSimple("installedsize")) / 1024
+ for filetype in txmbr.po.returnFileTypes():
+ totalFiles += len(txmbr.po.returnFileEntries(ftype=filetype))
+ downloadpkgs.append(txmbr.po)
return (downloadpkgs, totalSize, totalFiles)
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]