diff options
author | André Draszik <andre.draszik@jci.com> | 2019-02-05 02:32:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-12 14:04:31 +0000 |
commit | b10556c69436a14e704f64e493f115c724bf8ea3 (patch) | |
tree | a8d1f4bb93fa46dd6d8ecc45148a035b2f54f649 | |
parent | d11cbdf149cbfd273e76796a2444d4b9423c9ab0 (diff) | |
download | poky-b10556c69436a14e704f64e493f115c724bf8ea3.tar.gz |
util-linux: simplify meta-package RDEPENDS / RRECOMMENDS
The util-linux meta-package now simply RRECOMMENDS all
subpackages created. There is no distinction between what
it previously recommended or depended on for existing
packages.
This is to streamline the dependencies and to make things
less surprising.
It also stops the -dev package from depending on non-existing
packages like util-linux-losetup-dev etc.
[YOCTO #13058]
(From OE-Core rev: d0d6cc9ee59ed7a017e1b31404603a135a8717e8)
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/util-linux/util-linux.inc | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 5bc179e50b..5e40698644 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
@@ -33,35 +33,27 @@ PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pyl | |||
33 | 33 | ||
34 | python util_linux_binpackages () { | 34 | python util_linux_binpackages () { |
35 | def pkg_hook(f, pkg, file_regex, output_pattern, modulename): | 35 | def pkg_hook(f, pkg, file_regex, output_pattern, modulename): |
36 | pn = d.getVar('PN') | ||
37 | d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) | ||
38 | |||
36 | if d.getVar('ALTERNATIVE_' + pkg): | 39 | if d.getVar('ALTERNATIVE_' + pkg): |
37 | return | 40 | return |
38 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): | 41 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): |
39 | d.setVar('ALTERNATIVE_' + pkg, modulename) | 42 | d.setVar('ALTERNATIVE_' + pkg, modulename) |
40 | 43 | ||
41 | def pkg_hook_with_recommends(f, pkg, file_regex, output_pattern, modulename): | 44 | bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split()))) |
42 | pn = d.getVar('PN') | 45 | for dir in bindirs: |
43 | d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) | ||
44 | pkg_hook(f, pkg, file_regex, output_pattern, modulename) | ||
45 | |||
46 | for dir in [ '${base_sbindir}', '${base_bindir}' ]: | ||
47 | do_split_packages(d, root=dir, | 46 | do_split_packages(d, root=dir, |
48 | file_regex=r'(.*)', output_pattern='${PN}-%s', | 47 | file_regex=r'(.*)', output_pattern='${PN}-%s', |
49 | description='${PN} %s', | 48 | description='${PN} %s', |
50 | hook=pkg_hook, extra_depends='', prepend=True) | 49 | hook=pkg_hook, extra_depends='', prepend=True) |
51 | 50 | ||
52 | for dir in [ '${sbindir}', '${bindir}' ]: | ||
53 | do_split_packages(d, root=dir, | ||
54 | file_regex=r'(.*)', output_pattern='${PN}-%s', | ||
55 | description='${PN} %s', | ||
56 | hook=pkg_hook_with_recommends, extra_depends='', prepend=True) | ||
57 | |||
58 | # There are some symlinks for some binaries which we have ignored | 51 | # There are some symlinks for some binaries which we have ignored |
59 | # above. Add them to the package owning the binary they are | 52 | # above. Add them to the package owning the binary they are |
60 | # pointing to | 53 | # pointing to |
61 | extras = {} | 54 | extras = {} |
62 | dvar = d.getVar('PKGD') | 55 | dvar = d.getVar('PKGD') |
63 | for root in [ '${base_sbindir}', '${base_bindir}', '${sbindir}', '${bindir}' ]: | 56 | for root in bindirs: |
64 | root = d.expand(root) | ||
65 | for walkroot, dirs, files in os.walk(dvar + root): | 57 | for walkroot, dirs, files in os.walk(dvar + root): |
66 | for f in files: | 58 | for f in files: |
67 | file = os.path.join(walkroot, f) | 59 | file = os.path.join(walkroot, f) |
@@ -133,12 +125,6 @@ FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so | |||
133 | RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" | 125 | RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" |
134 | RREPLACES_util-linux-blkid = "e2fsprogs-blkid" | 126 | RREPLACES_util-linux-blkid = "e2fsprogs-blkid" |
135 | 127 | ||
136 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" | ||
137 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" | ||
138 | |||
139 | RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" | ||
140 | RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint" | ||
141 | |||
142 | RRECOMMENDS_${PN}_class-native = "" | 128 | RRECOMMENDS_${PN}_class-native = "" |
143 | RRECOMMENDS_${PN}_class-nativesdk = "" | 129 | RRECOMMENDS_${PN}_class-nativesdk = "" |
144 | RDEPENDS_${PN}_class-native = "" | 130 | RDEPENDS_${PN}_class-native = "" |