[oe-commits] [openembedded-core] 16/24: util-linux: one package per binary (pt 1b: symlinks)
git at git.openembedded.org
git at git.openembedded.org
Tue Feb 5 14:06:02 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9503352a3aa9bc212afbc4ef728fb0607df2ea20
Author: André Draszik <andre.draszik at jci.com>
AuthorDate: Tue Feb 5 02:32:34 2019 +0000
util-linux: one package per binary (pt 1b: symlinks)
Some of the binaries have symlinks. Add them to the
package owning the binary they are pointing to.
Signed-off-by: André Draszik <andre.draszik at jci.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/util-linux/util-linux.inc | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index a810452..a250db9 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -52,6 +52,28 @@ python util_linux_binpackages () {
file_regex=r'(.*)', output_pattern='${PN}-%s',
description='${PN} %s',
hook=pkg_hook, 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}' ]:
+ root = d.expand(root)
+ for walkroot, dirs, files in os.walk(dvar + root):
+ for f in files:
+ file = os.path.join(walkroot, f)
+ if not os.path.islink(file):
+ continue
+
+ pkg = os.path.basename(os.readlink(file))
+ extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1)
+
+ pn = d.getVar('PN')
+ for pkg, links in extras.items():
+ of = d.getVar('FILES_' + pn + '-' + pkg)
+ links = of + links
+ d.setVar('FILES_' + pn + '-' + pkg, links)
}
# we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list