summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-09-19 14:53:02 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-21 13:42:52 +0100
commit87849d842066f2e16582e40c8dc945b3ae762196 (patch)
tree713b3c27a71bf2636cd2fc006360ff3394fabbc2 /meta
parent2fa80ef30e8f806c4604f87fce84df6a5402a05b (diff)
downloadpoky-87849d842066f2e16582e40c8dc945b3ae762196.tar.gz
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. (From OE-Core rev: dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/busybox/busybox.inc32
-rw-r--r--meta/recipes-core/busybox/busybox_1.18.5.bb2
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 () {
205 install -m 0644 ${S}/busybox.links ${D}${sysconfdir} 205 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
206} 206}
207 207
208python package_do_filedeps_append () {
209 # We need to load the full set of busybox provides from the /etc/busybox.links
210 # The pkg_postinst_ is what creates the actual links
211
212 pkg = d.getVar('PN', True)
213 f_busybox = "/bin/busybox"
214 f_busybox_links = "/etc/busybox.links"
215
216 requires_files = []
217 provides_files = []
218
219 # Load/backup original set
220 filerprovides = d.getVar('FILERPROVIDES_%s_%s' % (f_busybox, pkg), True) or ""
221
222 dep_pipe = os.popen('sed -e "s,^,Provides: ," %s/%s%s' % (pkgdest, pkg, f_busybox_links))
223
224 process_deps(dep_pipe, pkg, "%s/%s%s" % (pkgdest, pkg, f_busybox), provides_files, requires_files)
225
226 # Add the new set
227 filerprovides += d.getVar('FILERPROVIDES_%s_%s' % (f_busybox, pkg), True) or ""
228
229 # Make sure there is an entry for this item in the FILERPROVIDESFLIST...
230 filerprovidesflist = (d.getVar('FILERPROVIDESFLIST_%s' % pkg, True) or "").split()
231 for file in provides_files:
232 if file not in filerprovidesflist:
233 filerprovidesflist.append(file)
234 d.setVar('FILERPROVIDESFLIST_%s' % pkg, " ".join(filerprovidesflist))
235
236 # Store the new provides
237 d.setVar('FILERPROVIDES_%s_%s' % (f_busybox, pkg), filerprovides)
238}
239
208pkg_postinst_${PN} () { 240pkg_postinst_${PN} () {
209 # If we are not making an image we create links for the utilities that doesn't exist 241 # If we are not making an image we create links for the utilities that doesn't exist
210 # so the update-alternatives script will get the utilities it needs 242 # 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 @@
1require busybox.inc 1require busybox.inc
2PR = "r0" 2PR = "r1"
3 3
4SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ 4SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
5 file://udhcpscript.patch \ 5 file://udhcpscript.patch \