summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-09-06 18:48:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-09 14:27:45 +0100
commit525979f3f68f85d9b590632dc181b7038b1ed7ee (patch)
treefa3b70d8c5d0dd683000910c255a54ce0a173288 /meta
parent4031de53f4dd2887862ac259b666206e20ab0812 (diff)
downloadpoky-525979f3f68f85d9b590632dc181b7038b1ed7ee.tar.gz
package_manager.py: search provides when not found by pkgname
Fixed when: PACKAGE_CLASSES = "package_rpm" IMAGE_INSTALL_append = " perl-module-warnings-register" $ bitbake core-image-minimal [snip] ERROR: perl-module-warnings-register not found in the base feeds [snip] And it works well when PACKAGE_CLASSES = "package_ipk" since perl provides perl-module-warnings-register, the "smart install perl-module-warnings-register" also works well, this was because _search_pkg_name_in_feeds() only searched pkg name, but no provides, this patch fixes the problem. (From OE-Core rev: 476f9ab6e37bd516919862835e6e00c960a9e242) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package_manager.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 810b728870..292ed44461 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -760,6 +760,22 @@ class RpmPM(PackageManager):
760 # bb.note('%s -> %s' % (pkg, pkg + '@' + arch)) 760 # bb.note('%s -> %s' % (pkg, pkg + '@' + arch))
761 return pkg + '@' + arch 761 return pkg + '@' + arch
762 762
763 # Search provides if not found by pkgname.
764 bb.note('Not found %s by name, searching provides ...' % pkg)
765 cmd = "%s %s query --provides %s --show-format='$name-$version'" % \
766 (self.smart_cmd, self.smart_opt, pkg)
767 cmd += " | sed -ne 's/ *Provides://p'"
768 bb.note('cmd: %s' % cmd)
769 output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
770 # Found a provider
771 if output:
772 bb.note('Found providers for %s: %s' % (pkg, output))
773 for p in output.split():
774 for arch in feed_archs:
775 arch = arch.replace('-', '_')
776 if p.rstrip().endswith('@' + arch):
777 return p
778
763 return "" 779 return ""
764 780
765 ''' 781 '''