diff options
author | André Draszik <andre.draszik@jci.com> | 2019-02-05 02:32:36 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-12 14:04:31 +0000 |
commit | 9ecdf9067503aa7576665fd83c9d132328af70dd (patch) | |
tree | 8f0657365c18747dadd78fd07037bc1375cfbc28 | |
parent | 6b82821f8ad4bdac2523a382a33559804531f36c (diff) | |
download | poky-9ecdf9067503aa7576665fd83c9d132328af70dd.tar.gz |
util-linux: one package per binary (pt 3: sbindir)
Similar to the previous patch.
Existing packages (and current dependency by main package):
* blkdiscard <- RRECOMMENDS
* findfs
* fsck.cramfs
* mkfs <- RRECOMMENDS
* mkfs.cramfs
* partx
* readprofile <- RRECOMMENDS
* rfkill
* runuser <- RDEPENDS
* sfdisk <- RRECOMMENDS
* uuidd
New packages:
* too many to list
To avoid breaking existing users, all the new packages
are added to the main package as RRECOMMENDS_${PN}, so
they are pulled into existing images etc.
The existing RDEPENDS_${PN} will need some further
clean-up in the future, as it appears a bit random which
packages the main package depends on vs. recommends.
Nevertheless, all existing packages have been added to
RRECOMMENDS this time, even if they weren't in RDEPENDS /
RRECOMMENDS before.
[YOCTO #13058]
(From OE-Core rev: 19f63aa911ff9d8bea62102c3f3f54cf6dccd6d8)
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 | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 4359a1c3fb..3b0598b708 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
@@ -28,17 +28,13 @@ MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" | |||
28 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ | 28 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz \ |
29 | " | 29 | " |
30 | 30 | ||
31 | PACKAGES =+ "util-linux-blkdiscard util-linux-sfdisk \ | 31 | PACKAGES =+ "util-linux-swaponoff \ |
32 | util-linux-swaponoff \ | 32 | util-linux-uuidgen util-linux-lscpu \ |
33 | util-linux-readprofile util-linux-uuidd \ | 33 | util-linux-mcookie \ |
34 | util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs \ | 34 | util-linux-lsblk \ |
35 | util-linux-mkfs util-linux-mcookie util-linux-rfkill \ | 35 | util-linux-prlimit \ |
36 | util-linux-lsblk util-linux-mkfs.cramfs \ | ||
37 | util-linux-partx \ | ||
38 | util-linux-findfs util-linux-prlimit \ | ||
39 | util-linux-ionice util-linux-unshare" | 36 | util-linux-ionice util-linux-unshare" |
40 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" | 37 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" |
41 | PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}" | ||
42 | 38 | ||
43 | python util_linux_binpackages () { | 39 | python util_linux_binpackages () { |
44 | def pkg_hook(f, pkg, file_regex, output_pattern, modulename): | 40 | def pkg_hook(f, pkg, file_regex, output_pattern, modulename): |
@@ -47,18 +43,29 @@ python util_linux_binpackages () { | |||
47 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): | 43 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): |
48 | d.setVar('ALTERNATIVE_' + pkg, modulename) | 44 | d.setVar('ALTERNATIVE_' + pkg, modulename) |
49 | 45 | ||
46 | def pkg_hook_with_recommends(f, pkg, file_regex, output_pattern, modulename): | ||
47 | pn = d.getVar('PN') | ||
48 | d.appendVar('RRECOMMENDS_%s' % pn, ' %s' % pkg) | ||
49 | pkg_hook(f, pkg, file_regex, output_pattern, modulename) | ||
50 | |||
50 | for dir in [ '${base_sbindir}', '${base_bindir}' ]: | 51 | for dir in [ '${base_sbindir}', '${base_bindir}' ]: |
51 | do_split_packages(d, root=dir, | 52 | do_split_packages(d, root=dir, |
52 | file_regex=r'(.*)', output_pattern='${PN}-%s', | 53 | file_regex=r'(.*)', output_pattern='${PN}-%s', |
53 | description='${PN} %s', | 54 | description='${PN} %s', |
54 | hook=pkg_hook, extra_depends='', prepend=True) | 55 | hook=pkg_hook, extra_depends='', prepend=True) |
55 | 56 | ||
57 | for dir in [ '${sbindir}' ]: | ||
58 | do_split_packages(d, root=dir, | ||
59 | file_regex=r'(.*)', output_pattern='${PN}-%s', | ||
60 | description='${PN} %s', | ||
61 | hook=pkg_hook_with_recommends, extra_depends='', prepend=True) | ||
62 | |||
56 | # There are some symlinks for some binaries which we have ignored | 63 | # There are some symlinks for some binaries which we have ignored |
57 | # above. Add them to the package owning the binary they are | 64 | # above. Add them to the package owning the binary they are |
58 | # pointing to | 65 | # pointing to |
59 | extras = {} | 66 | extras = {} |
60 | dvar = d.getVar('PKGD') | 67 | dvar = d.getVar('PKGD') |
61 | for root in [ '${base_sbindir}', '${base_bindir}' ]: | 68 | for root in [ '${base_sbindir}', '${base_bindir}', '${sbindir}' ]: |
62 | root = d.expand(root) | 69 | root = d.expand(root) |
63 | for walkroot, dirs, files in os.walk(dvar + root): | 70 | for walkroot, dirs, files in os.walk(dvar + root): |
64 | for f in files: | 71 | for f in files: |
@@ -120,16 +127,8 @@ FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" | |||
120 | 127 | ||
121 | FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" | 128 | FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" |
122 | 129 | ||
123 | FILES_util-linux-blkdiscard = "${sbindir}/blkdiscard" | ||
124 | FILES_util-linux-sfdisk = "${sbindir}/sfdisk" | ||
125 | FILES_util-linux-mcookie = "${bindir}/mcookie" | 130 | FILES_util-linux-mcookie = "${bindir}/mcookie" |
126 | FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}" | ||
127 | FILES_util-linux-uuidgen = "${bindir}/uuidgen" | 131 | FILES_util-linux-uuidgen = "${bindir}/uuidgen" |
128 | FILES_util-linux-uuidd = "${sbindir}/uuidd" | ||
129 | FILES_util-linux-rfkill = "${sbindir}/rfkill.${BPN}" | ||
130 | FILES_util-linux-partx = "${sbindir}/partx" | ||
131 | FILES_util-linux-findfs = "${sbindir}/findfs" | ||
132 | FILES_util-linux-runuser = "${sbindir}/runuser" | ||
133 | FILES_util-linux-prlimit = "${bindir}/prlimit" | 132 | FILES_util-linux-prlimit = "${bindir}/prlimit" |
134 | FILES_util-linux-ionice = "${bindir}/ionice.${BPN}" | 133 | FILES_util-linux-ionice = "${bindir}/ionice.${BPN}" |
135 | FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*" | 134 | FILES_util-linux-runuser = "${sysconfdir}/pam.d/runuser*" |
@@ -142,11 +141,6 @@ FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so | |||
142 | FILES_util-linux-lsblk = "${bindir}/lsblk" | 141 | FILES_util-linux-lsblk = "${bindir}/lsblk" |
143 | FILES_util-linux-lscpu = "${bindir}/lscpu" | 142 | FILES_util-linux-lscpu = "${bindir}/lscpu" |
144 | 143 | ||
145 | FILES_util-linux-mkfs = "${sbindir}/mkfs" | ||
146 | |||
147 | FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs" | ||
148 | FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs" | ||
149 | |||
150 | FILES_util-linux-unshare = "${bindir}/unshare.${BPN}" | 144 | FILES_util-linux-unshare = "${bindir}/unshare.${BPN}" |
151 | 145 | ||
152 | # Util-linux' blkid replaces the e2fsprogs one | 146 | # Util-linux' blkid replaces the e2fsprogs one |
@@ -156,7 +150,7 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid" | |||
156 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" | 150 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" |
157 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" | 151 | RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}" |
158 | 152 | ||
159 | RRECOMMENDS_${PN} = "util-linux-blkdiscard util-linux-sfdisk util-linux-readprofile util-linux-mkfs util-linux-prlimit util-linux-ionice" | 153 | RRECOMMENDS_${PN} = "util-linux-prlimit util-linux-ionice" |
160 | RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" | 154 | RRECOMMENDS_${PN} += "${PN}-blockdev ${PN}-cfdisk ${PN}-ctrlaltdel ${PN}-fdisk ${PN}-mkswap ${PN}-nologin ${PN}-pivot-root ${PN}-switch-root" |
161 | RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint" | 155 | RRECOMMENDS_${PN} += "${PN}-dmesg ${PN}-kill ${PN}-more ${PN}-mount ${PN}-mountpoint" |
162 | 156 | ||
@@ -243,7 +237,7 @@ ALTERNATIVE_PRIORITY = "80" | |||
243 | ALTERNATIVE_${PN} = " \ | 237 | ALTERNATIVE_${PN} = " \ |
244 | hexdump last lastb logger mesg renice wall \ | 238 | hexdump last lastb logger mesg renice wall \ |
245 | setsid chrt flock utmpdump eject taskset fallocate \ | 239 | setsid chrt flock utmpdump eject taskset fallocate \ |
246 | fsfreeze nsenter cal rev \ | 240 | nsenter cal rev \ |
247 | " | 241 | " |
248 | 242 | ||
249 | ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" | 243 | ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" |
@@ -295,7 +289,6 @@ ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" | |||
295 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | 289 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" |
296 | ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" | 290 | ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" |
297 | 291 | ||
298 | ALTERNATIVE_util-linux-readprofile = "readprofile" | ||
299 | ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" | 292 | ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" |
300 | 293 | ||
301 | ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" | 294 | ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" |
@@ -307,7 +300,6 @@ ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" | |||
307 | 300 | ||
308 | ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" | 301 | ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" |
309 | 302 | ||
310 | ALTERNATIVE_util-linux-rfkill = "rfkill" | ||
311 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" | 303 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" |
312 | 304 | ||
313 | ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" | 305 | ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" |