diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-09-19 14:53:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-21 13:32:33 +0100 |
commit | dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7 (patch) | |
tree | 979b0c1f979cda1c9b8332e88669fc419e4d2de9 /meta/recipes-core | |
parent | e150afea5a9af8e1bc5aaecd9eb3fe86d7b79f44 (diff) | |
download | openembedded-core-dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7.tar.gz openembedded-core-dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7.tar.bz2 openembedded-core-dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7.zip |
busybox: Enhance to add dynamic per-file provides
When using the RPM package backend, we need a full list of per-file
provides (and requires). The busybox package provides a number of
command line utilities, such as /usr/bin/env. However, because
the utilities are created at post install time via scripting the
provide of each of the links was never made. So any programs,
such as python, that require /usr/bin/env were unable to resolve
the dependency and failed.
This change only affects packaging backends that use per-file
dependency data. Currently RPM is the only packaging backend
with this ability.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 32 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox_1.18.5.bb | 2 |
2 files changed, 33 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 3f9335892c..acd635b1e3 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -205,6 +205,38 @@ do_install () { install -m 0644 ${S}/busybox.links ${D}${sysconfdir} } +python package_do_filedeps_append () { + # We need to load the full set of busybox provides from the /etc/busybox.links + # The pkg_postinst_ is what creates the actual links + + pkg = d.getVar('PN', True) + f_busybox = "/bin/busybox" + f_busybox_links = "/etc/busybox.links" + + requires_files = [] + provides_files = [] + + # Load/backup original set + filerprovides = d.getVar('FILERPROVIDES_%s_%s' % (f_busybox, pkg), True) or "" + + dep_pipe = os.popen('sed -e "s,^,Provides: ," %s/%s%s' % (pkgdest, pkg, f_busybox_links)) + + process_deps(dep_pipe, pkg, "%s/%s%s" % (pkgdest, pkg, f_busybox), provides_files, requires_files) + + # Add the new set + filerprovides += d.getVar('FILERPROVIDES_%s_%s' % (f_busybox, pkg), True) or "" + + # Make sure there is an entry for this item in the FILERPROVIDESFLIST... + filerprovidesflist = (d.getVar('FILERPROVIDESFLIST_%s' % pkg, True) or "").split() + for file in provides_files: + if file not in filerprovidesflist: + filerprovidesflist.append(file) + d.setVar('FILERPROVIDESFLIST_%s' % pkg, " ".join(filerprovidesflist)) + + # Store the new provides + d.setVar('FILERPROVIDES_%s_%s' % (f_busybox, pkg), filerprovides) +} + pkg_postinst_${PN} () { # If we are not making an image we create links for the utilities that doesn't exist # so the update-alternatives script will get the utilities it needs diff --git a/meta/recipes-core/busybox/busybox_1.18.5.bb b/meta/recipes-core/busybox/busybox_1.18.5.bb index c0dc1d4997..bdafb316a5 100644 --- a/meta/recipes-core/busybox/busybox_1.18.5.bb +++ b/meta/recipes-core/busybox/busybox_1.18.5.bb @@ -1,5 +1,5 @@ require busybox.inc -PR = "r0" +PR = "r1" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://udhcpscript.patch \ |