« Return to Thread: [PATCH] yum-builddep: print all missing deps, not only the first one found

[PATCH] yum-builddep: print all missing deps, not only the first one found

by Daniel Mach :: Rate this Message:

| View in Thread

---
 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

_______________________________________________
Yum-devel mailing list
Yum-devel@...
http://lists.baseurl.org/mailman/listinfo/yum-devel

 « Return to Thread: [PATCH] yum-builddep: print all missing deps, not only the first one found