[oe-commits] [openembedded-core] 07/20: package_manager.py: Adjust error message order

git at git.openembedded.org git at git.openembedded.org
Mon Sep 19 22:58:44 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 469a2dda0b28ce9717701127f89fe422e2d1e1b5
Author: Mark Hatle <mark.hatle at windriver.com>
AuthorDate: Thu Sep 15 17:47:38 2016 -0500

    package_manager.py: Adjust error message order
    
    Move the debug before the error (as it can take many pages.)  This makes it
    much easier for the user to see the actual error message as it is still on
    the screen.
    
    Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oe/package_manager.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 30e1de9..238dddc 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -839,10 +839,10 @@ class RpmPM(PackageManager):
                     new_pkg = self._search_pkg_name_in_feeds(subst, feed_archs)
                     if not new_pkg:
                         # Failed to translate, package not found!
-                        err_msg = '%s not found in the %s feeds (%s).\n' % \
+                        err_msg = '%s not found in the %s feeds (%s).' % \
                                   (pkg, mlib, " ".join(feed_archs))
                         if not attempt_only:
-                            err_msg += " ".join(self.fullpkglist)
+                            bb.error("List of available packages: " + " ".join(self.fullpkglist))
                             bb.fatal(err_msg)
                         bb.warn(err_msg)
                     else:
@@ -856,10 +856,10 @@ class RpmPM(PackageManager):
                 default_archs = self.ml_prefix_list['default']
                 new_pkg = self._search_pkg_name_in_feeds(pkg, default_archs)
                 if not new_pkg:
-                    err_msg = '%s not found in the base feeds (%s).\n' % \
+                    err_msg = '%s not found in the feeds (%s).' % \
                               (pkg, ' '.join(default_archs))
                     if not attempt_only:
-                        err_msg += " ".join(self.fullpkglist)
+                        bb.error("List of available packages: " + " ".join(self.fullpkglist))
                         bb.fatal(err_msg)
                     bb.warn(err_msg)
                 else:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list