* [PATCH 0/1] package_manager.py: search provides when not found by pkgname
@ 2015-09-07 1:48 Robert Yang
2015-09-07 1:48 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2015-09-07 1:48 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 8402958cd2cb87b8283c8ee4e2d08e1a6717d67a:
pseudo_1.7.3.bb: New version of pseudo (2015-09-06 15:24:28 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/smart
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/smart
Robert Yang (1):
package_manager.py: search provides when not found by pkgname
meta/lib/oe/package_manager.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] package_manager.py: search provides when not found by pkgname
2015-09-07 1:48 [PATCH 0/1] package_manager.py: search provides when not found by pkgname Robert Yang
@ 2015-09-07 1:48 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2015-09-07 1:48 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/lib/oe/package_manager.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 810b728..292ed44 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -760,6 +760,22 @@ class RpmPM(PackageManager):
# bb.note('%s -> %s' % (pkg, pkg + '@' + arch))
return pkg + '@' + arch
+ # Search provides if not found by pkgname.
+ bb.note('Not found %s by name, searching provides ...' % pkg)
+ cmd = "%s %s query --provides %s --show-format='$name-$version'" % \
+ (self.smart_cmd, self.smart_opt, pkg)
+ cmd += " | sed -ne 's/ *Provides://p'"
+ bb.note('cmd: %s' % cmd)
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ # Found a provider
+ if output:
+ bb.note('Found providers for %s: %s' % (pkg, output))
+ for p in output.split():
+ for arch in feed_archs:
+ arch = arch.replace('-', '_')
+ if p.rstrip().endswith('@' + arch):
+ return p
+
return ""
'''
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-07 1:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 1:48 [PATCH 0/1] package_manager.py: search provides when not found by pkgname Robert Yang
2015-09-07 1:48 ` [PATCH 1/1] " Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox