diff options
| -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 = "" |
