From: "Sinan Kaya" <okaya@kernel.org>
To: openembedded-core@lists.openembedded.org
Cc: Sinan Kaya <okaya@kernel.org>
Subject: [meta-oe][PATCH v2] net-tools: split into binary packages
Date: Sat, 21 Nov 2020 02:01:08 +0000 [thread overview]
Message-ID: <20201121020108.19793-1-okaya@kernel.org> (raw)
Support per binary package to not bloat the system with unneeded
tools.
Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
.../net-tools/net-tools_1.60-26.bb | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
index 8bd30fc6d9b..ace18b830f2 100644
--- a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -129,4 +129,29 @@ python __anonymous() {
}
ALTERNATIVE_PRIORITY = "100"
+python __anonymous () {
+ packages = []
+ for prog in d.getVar('base_sbindir_progs').split():
+ pkg = "net-tools-%s" % prog.replace("_", "-")
+ packages.append(pkg)
+ if not d.getVar("FILES_%s" % pkg):
+ d.setVar("FILES_%s" % pkg, "${base_sbindir}/%s*" % prog)
+ for prog in d.getVar('base_bindir_progs').split():
+ pkg = "net-tools-%s" % prog.replace("_", "-")
+ packages.append(pkg)
+ if not d.getVar("FILES_%s" % pkg):
+ d.setVar("FILES_%s" % pkg, "${base_bindir}/%s*" % prog)
+ pkg = "net-tools-man"
+ packages.append(pkg)
+ if not d.getVar("FILES_%s" % pkg):
+ d.setVar("FILES_%s" % pkg, "${mandir}/*")
+ d.setVar("NETTOOLS_PACKAGES", " ".join(packages))
+}
+# "net-tools" is a metapackage which pulls in all net-tools binaries
+PACKAGES += "${NETTOOLS_PACKAGES}"
+PROVIDES += "${NETTOOLS_PACKAGES}"
+FILES_${PN} = ""
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} += "${NETTOOLS_PACKAGES}"
+
BBCLASSEXTEND = "native nativesdk"
--
2.17.1
reply other threads:[~2020-11-21 2:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201121020108.19793-1-okaya@kernel.org \
--to=okaya@kernel.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.