summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-02-05 02:32:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-12 14:04:24 +0000
commitd0d6cc9ee59ed7a017e1b31404603a135a8717e8 (patch)
tree967318d95534dc50f0bf499024f05115df31ebf2
parent7b66185c447453640f26e2563e85b6422a3e6118 (diff)
downloadopenembedded-core-contrib-d0d6cc9ee59ed7a017e1b31404603a135a8717e8.tar.gz
openembedded-core-contrib-d0d6cc9ee59ed7a017e1b31404603a135a8717e8.tar.bz2
openembedded-core-contrib-d0d6cc9ee59ed7a017e1b31404603a135a8717e8.zip
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] 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.inc26
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
python util_linux_binpackages () {
def pkg_hook(f, pkg, file_regex, output_pattern, modulename):
+ pn = d.getVar('PN')
+ d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg)
+
if d.getVar('ALTERNATIVE_' + pkg):
return
if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename):
d.setVar('ALTERNATIVE_' + pkg, modulename)
- def pkg_hook_with_recommends(f, pkg, file_regex, output_pattern, modulename):
- pn = d.getVar('PN')
- d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg)
- pkg_hook(f, pkg, file_regex, output_pattern, modulename)
-
- for dir in [ '${base_sbindir}', '${base_bindir}' ]:
+ bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split())))
+ for dir in bindirs:
do_split_packages(d, root=dir,
file_regex=r'(.*)', output_pattern='${PN}-%s',
description='${PN} %s',
hook=pkg_hook, extra_depends='', prepend=True)
- for dir in [ '${sbindir}', '${bindir}' ]:
- do_split_packages(d, root=dir,
- file_regex=r'(.*)', output_pattern='${PN}-%s',
- description='${PN} %s',
- hook=pkg_hook_with_recommends, extra_depends='', prepend=True)
-
# There are some symlinks for some binaries which we have ignored
# above. Add them to the package owning the binary they are
# pointing to
extras = {}
dvar = d.getVar('PKGD')
- for root in [ '${base_sbindir}', '${base_bindir}', '${sbindir}', '${bindir}' ]:
- root = d.expand(root)
+ for root in bindirs:
for walkroot, dirs, files in os.walk(dvar + root):
for f in files:
file = os.path.join(walkroot, f)
@@ -133,12 +125,6 @@ FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
-RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
-RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
-
-RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root"
-RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint"
-
RRECOMMENDS_${PN}_class-native = ""
RRECOMMENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}_class-native = ""