summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
33 33
34python util_linux_binpackages () { 34python 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
133RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" 125RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
134RREPLACES_util-linux-blkid = "e2fsprogs-blkid" 126RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
135 127
136RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
137RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
138
139RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root"
140RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint"
141
142RRECOMMENDS_${PN}_class-native = "" 128RRECOMMENDS_${PN}_class-native = ""
143RRECOMMENDS_${PN}_class-nativesdk = "" 129RRECOMMENDS_${PN}_class-nativesdk = ""
144RDEPENDS_${PN}_class-native = "" 130RDEPENDS_${PN}_class-native = ""