Skip to contentSkip to conversation

net-tools: split mii-tool into its own package

PATCH In review Sinan Kaya 2 participants 3 messages Dec 16, 2020 – Jan 4, 2021

lore
Share & tools
lore

Sinan Kaya

author
#0 lore raw

PATCH v5 1/1 net-tools: split mii-tool into its own package

Move the mii-tool into its own package. Useful for size constrained systems that only want the mii-tool only.

---
 .../net-tools/net-tools_1.60-20181103.bb          | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb +14 -1
index e97731073e8..1784bf9ec24 100644
@@ -107,4 +107,17 @@ python __anonymous() {
 }
 ALTERNATIVE_PRIORITY = "100"
 
-BBCLASSEXTEND = "native nativesdk"
+NETTOOLS_PACKAGES = "${PN}-mii-tool"
+
+PACKAGE_BEFORE_PN = "${NETTOOLS_PACKAGES}"
+RDEPENDS_${PN} += "${NETTOOLS_PACKAGES}"
+
+FILES_${PN}-mii-tool = "${base_sbindir}/mii-tool"
+
+ALTERNATIVE_${PN}_remove = "mii-tool"
+
+ALTERNATIVE_${PN}-mii-tool = "mii-tool"
+ALTERNATIVE_TARGET[mii-tool] = "${base_sbindir}/mii-tool"
+ALTERNATIVE_LINK_NAME[mii-tool] = "${base_sbindir}/mii-tool"
+
+BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file
Signature · 1 line
2.17.1
#1 lore raw
Quoted 23 lines · Sinan Kaya

Move the mii-tool into its own package. Useful for size constrained systems that only want the mii-tool only.

---
 .../net-tools/net-tools_1.60-20181103.bb          | 15 ++++++++++++++-

 1 file changed, 14 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

20181103.bb b/meta/recipes-extended/net-tools/net-tools_1.60- 20181103.bb
index e97731073e8..1784bf9ec24 100644

meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb +0 -0
@@ -107,4 +107,17 @@ python __anonymous() {
  }

 ALTERNATIVE_PRIORITY = "100"

meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb +4 -1
-BBCLASSEXTEND = "native nativesdk"
+NETTOOLS_PACKAGES = "${PN}-mii-tool"
+
+PACKAGE_BEFORE_PN = "${NETTOOLS_PACKAGES}"
+RDEPENDS_${PN} += "${NETTOOLS_PACKAGES}"

meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb python __anonymous() { · line 123

Quoted 10 lines
meta/recipes-extended/net-tools/net-tools_1.60-20181103.bb +10 -0
+
+FILES_${PN}-mii-tool = "${base_sbindir}/mii-tool"
+
+ALTERNATIVE_${PN}_remove = "mii-tool"
+
+ALTERNATIVE_${PN}-mii-tool = "mii-tool"
+ALTERNATIVE_TARGET[mii-tool] = "${base_sbindir}/mii-tool"
+ALTERNATIVE_LINK_NAME[mii-tool] = "${base_sbindir}/mii-tool"
+
+BBCLASSEXTEND = "native nativesdk"

I'm still trying to work through testing of these. This one seems to result in:

https://autobuilder.yoctoproject.org/typhoon/#/builders/23/builds/3077/steps/11/logs/warnings

which is from net-tools-native.

NETTOOLS_PACKAGES_class-native = ""

may be the neatest fix for that I can think of offhand.

Cheers,

Richard