[Yum-devel] [PATCH] yum-builddep: print all missing deps, not only the first one found
Daniel Mach
dmach at redhat.com
Wed May 23 07:37:21 UTC 2012
---
yum-builddep.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/yum-builddep.py b/yum-builddep.py
index f67c810..3251949 100755
--- a/yum-builddep.py
+++ b/yum-builddep.py
@@ -152,6 +152,7 @@ class YumBuildDep(YumUtilBase):
sys.exit(1)
def install_deps(self, deplist):
+ errors = set()
for dep in deplist:
self.logger.debug(' REQ: %s' % dep)
if dep.startswith("rpmlib("):
@@ -164,10 +165,13 @@ class YumBuildDep(YumUtilBase):
pkg = self.returnPackageByDep(dep)
self.logger.info(' --> %s' % pkg)
self.install(pkg)
-
except yum.Errors.YumBaseError, e:
- self.logger.error("Error: %s" % e)
- sys.exit(1)
+ errors.add(unicode(e))
+
+ if errors:
+ for i in sorted(errors):
+ self.logger.error("Error: %s" % i)
+ sys.exit(1)
# go through each of the pkgs, figure out what they are/where they are
# if they are not a local package then run
--
1.7.10.2
More information about the Yum-devel
mailing list