Skip to contentSkip to conversation

Use alternatives for all of binutils instead of -symlinks

PATCH In review Peter Seebach 3 participants 11 messages Oct 10, 2013 – Nov 4, 2013

lore
Share & tools
lore
#0 lore raw

cover Use alternatives for all of binutils instead of -symlinks

The original complaint that got me started on this was that someone was using binutils on a target, and didn't have an ld command, so they asked for it. We added binutils-symlinks, and that seemed to work, but eventually we ran into a problem because "ar" and "strings" weren't showing up.

After some asking about as to why ar and strings might be omitted from binutils, we concluded that it was probably because they were using the alternatives mechanism. In a local branch, we experimented for a while with just using that instead of the -symlinks package, and found that it was overall better-behaved; in particular, it produces the desireable result that you don't have to know about or add a "-symlinks" package to use the utilities in the common case where you just install a package and expect its binaries to show up. It also eliminates the odd special case difference between ar/strings (which can be provided by busybox) and the other utilities.

This is implemented as two patches. The first switches to using the alternatives mechanism, but leaves the alternatives in the -symlinks package rather than in the base package. The second moves them into the base package, and adds an RPROVIDES for the -symlinks name in case anyone is using it.

One caveat: This can produce warnings because the "embedspu" and "ld.gold" binaries don't always exist, but they sometimes exist. I'm not sure whether there's a good way to fix that...

The following changes since commit 1149b1fef8912f77d971242dfec151fff5a3aa51:

build-appliance: Update SRCREV for release (2013-10-08 16:33:25 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib seebs/binutils-alternatives
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/binutils-alternatives

Peter Seebach (2):
Use alternatives for the binutils-symlinks package. Drop binutils-symlinks

 meta/recipes-devtools/binutils/binutils.inc |   68 ++++++++++++++++-----------
 1 files changed, 40 insertions(+), 28 deletions(-)
#1 lore raw

PATCH 1/2 Use alternatives for the binutils-symlinks package.

The ar and strings utilities are provided as alternatives, but the rest of binutils is being done with binutils-symlinks. This has the side effect that if you want "as", and you install binutils-symlinks to get it, you don't get "ar" from it, because it's not in the symlinks package.

Solution: Use the same mechanisms for everything, putting everything in ALTERNATIVES, so installing binutils on a target produces the expected behavior of having the various utilities in place.

Issues: The "embedspu" and "ld.gold" binaries may or may not exist, but the determination of whether to list them as alternatives is being made before the point at which we can easily check for them, so that can produce warnings.

---
 meta/recipes-devtools/binutils/binutils.inc |   69 +++++++++++++++++----------
 1 files changed, 43 insertions(+), 26 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +43 -26
index 5e78dc0..1c7ffcf 100644
@@ -22,31 +22,51 @@ FILES_${PN} = " \
 	${libdir}/lib*-*.so \
 	${prefix}/${TARGET_SYS}/bin/*"
 
+# Use alternatives rather than actual symlinks.
+FILES_${PN}-symlinks = ""
+
+ALLOW_EMPTY_${PN}-symlinks = "1"
+
 FILES_${PN}-dev = " \
 	${includedir} \
 	${libdir}/*.la \
 	${libdir}/libbfd.so \
 	${libdir}/libopcodes.so"
 
-FILES_${PN}-symlinks = " \
-	${bindir}/addr2line \
-	${bindir}/as \
-	${bindir}/c++filt \
-	${bindir}/embedspu \
-	${bindir}/gprof \
-	${bindir}/ld \
-	${bindir}/ld.bfd \
-	${bindir}/ld.gold \
-	${bindir}/nm \
-	${bindir}/objcopy \
-	${bindir}/objdump \
-	${bindir}/ranlib \
-	${bindir}/readelf \
-	${bindir}/elfedit \
-	${bindir}/size \
-	${bindir}/strip"
-
-FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug"
+# Rather than duplicating multiple entries for these, make one
+# list and reuse it.
+
+USE_ALTERNATIVES_FOR = " \
+	addr2line \
+	ar \
+	as \
+	c++filt \
+	elfedit \
+	embedspu \
+	gprof \
+	ld \
+	ld.bfd \
+	ld.gold \
+	nm \
+	objcopy \
+	objdump \
+	ranlib \
+	readelf \
+	size \
+	strings \
+	strip \
+"
+
+python do_package_prepend() {
+    make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
+    prefix = d.getVar("TARGET_PREFIX", True)
+    bindir = d.getVar("bindir", True)
+    for alt in make_alts.split():
+        d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt)
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt)
+}
+
+# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug"
 
 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
 
@@ -120,7 +140,9 @@ do_install () {
 		ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,`
 	done
 
-	rm -f ${D}${bindir}/ar ${D}${bindir}/strings
+        for alt in ${USE_ALTERNATIVES_FOR}; do
+                rm -f ${D}${bindir}/$alt
+        done
 
 	oe_multilib_header bfd.h
 }
@@ -129,10 +151,5 @@ inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN}-symlinks = "ar strings"
-
-ALTERNATIVE_LINK_NAME[ar] = "${bindir}/ar"
-ALTERNATIVE_TARGET[ar] = "${bindir}/${TARGET_PREFIX}ar"
+ALTERNATIVE_${PN}-symlinks = "${USE_ALTERNATIVES_FOR}"
 
-ALTERNATIVE_LINK_NAME[strings] = "${bindir}/strings"
-ALTERNATIVE_TARGET[strings] = "${bindir}/${TARGET_PREFIX}strings"
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 Drop binutils-symlinks

In reply to Peter Seebach

The -symlinks package doesn't really add any value if we're using update-alternatives. Drop it, leaving a spare RPROVIDES in case anyone thought they needed it.

---
 meta/recipes-devtools/binutils/binutils.inc |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +2 -7
index 1c7ffcf..7657a87 100644
@@ -15,17 +15,12 @@ DEPENDS = "flex-native bison-native zlib-native"
 
 inherit autotools gettext multilib_header
 
-PACKAGES += "${PN}-symlinks"
-
 FILES_${PN} = " \
 	${bindir}/${TARGET_PREFIX}* \
 	${libdir}/lib*-*.so \
 	${prefix}/${TARGET_SYS}/bin/*"
 
-# Use alternatives rather than actual symlinks.
-FILES_${PN}-symlinks = ""
-
-ALLOW_EMPTY_${PN}-symlinks = "1"
+RPROVIDES_${PN} += "${PN}-symlinks"
 
 FILES_${PN}-dev = " \
 	${includedir} \
@@ -151,5 +146,5 @@ inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN}-symlinks = "${USE_ALTERNATIVES_FOR}"
+ALTERNATIVE_${PN} = "${USE_ALTERNATIVES_FOR}"
 
Signature · 1 line
1.7.1
#3 lore raw
In reply to Peter Seebach

During MUT builds, we saw a failure with the toolchain

| Computing transaction...error: Can't install binutils-cross-canadian-arm-2.23.2-r4@i686_nativesdk: no package provides update-alternatives-cworth |

Can be seen all architectures.

Sau!

Quoted 48 lines · Peter Seebach

The original complaint that got me started on this was that someone was using binutils on a target, and didn't have an ld command, so they asked for it. We added binutils-symlinks, and that seemed to work, but eventually we ran into a problem because "ar" and "strings" weren't showing up.

After some asking about as to why ar and strings might be omitted from binutils, we concluded that it was probably because they were using the alternatives mechanism. In a local branch, we experimented for a while with just using that instead of the -symlinks package, and found that it was overall better-behaved; in particular, it produces the desireable result that you don't have to know about or add a "-symlinks" package to use the utilities in the common case where you just install a package and expect its binaries to show up. It also eliminates the odd special case difference between ar/strings (which can be provided by busybox) and the other utilities.

This is implemented as two patches. The first switches to using the alternatives mechanism, but leaves the alternatives in the -symlinks package rather than in the base package. The second moves them into the base package, and adds an RPROVIDES for the -symlinks name in case anyone is using it.

One caveat: This can produce warnings because the "embedspu" and "ld.gold" binaries don't always exist, but they sometimes exist. I'm not sure whether there's a good way to fix that...

The following changes since commit 1149b1fef8912f77d971242dfec151fff5a3aa51:

   build-appliance: Update SRCREV for release (2013-10-08 16:33:25 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib seebs/binutils-alternatives
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/binutils-alternatives

Peter Seebach (2):
Use alternatives for the binutils-symlinks package. Drop binutils-symlinks

  meta/recipes-devtools/binutils/binutils.inc |   68 ++++++++++++++++-----------
  1 files changed, 40 insertions(+), 28 deletions(-)

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
Quoted 10 lines · Saul Wold

During MUT builds, we saw a failure with the toolchain

| Computing transaction...error: Can't install binutils-cross-canadian-arm-2.23.2-r4@i686_nativesdk: no package provides update-alternatives-cworth
|

Can be seen all architectures.

Sounds like the new code needs to be restricted to 'class-target'.

--Mark

Quoted 59 lines

Sau!

Quoted 39 lines · Peter Seebach

The original complaint that got me started on this was that someone was using binutils on a target, and didn't have an ld command, so they asked for it. We added binutils-symlinks, and that seemed to work, but eventually we ran into a problem because "ar" and "strings" weren't showing up.

After some asking about as to why ar and strings might be omitted from binutils, we concluded that it was probably because they were using the alternatives mechanism. In a local branch, we experimented for a while with just using that instead of the -symlinks package, and found that it was overall better-behaved; in particular, it produces the desireable result that you don't have to know about or add a "-symlinks" package to use the utilities in the common case where you just install a package and expect its binaries to show up. It also eliminates the odd special case difference between ar/strings (which can be provided by busybox) and the other utilities.

This is implemented as two patches. The first switches to using the alternatives mechanism, but leaves the alternatives in the -symlinks package rather than in the base package. The second moves them into the base package, and adds an RPROVIDES for the -symlinks name in case anyone is using it.

One caveat: This can produce warnings because the "embedspu" and "ld.gold" binaries don't always exist, but they sometimes exist. I'm not sure whether there's a good way to fix that...

The following changes since commit 1149b1fef8912f77d971242dfec151fff5a3aa51:

    build-appliance: Update SRCREV for release (2013-10-08 16:33:25 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib seebs/binutils-alternatives
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/binutils-alternatives

Peter Seebach (2):
Use alternatives for the binutils-symlinks package. Drop binutils-symlinks

Quoted 9 lines
   meta/recipes-devtools/binutils/binutils.inc |   68 ++++++++++++++++-----------
   1 files changed, 40 insertions(+), 28 deletions(-)

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw

PATCH 1/2 Use alternatives for the binutils-symlinks package.

In reply to Saul Wold

The ar and strings utilities are provided as alternatives, but the rest of binutils is being done with binutils-symlinks. This has the side effect that if you want "as", and you install binutils-symlinks to get it, you don't get "ar" from it, because it's not in the symlinks package.

Solution: Use the same mechanisms for everything, putting everything in ALTERNATIVES, so installing binutils on a target produces the expected behavior of having the various utilities in place. (We do this only for class-target, though.)

Issues: The "embedspu" and "ld.gold" binaries may or may not exist, but the determination of whether to list them as alternatives is being made before the point at which we can easily check for them, so that can produce warnings.

---
 meta/recipes-devtools/binutils/binutils.inc |   67 ++++++++++++++++----------
 1 files changed, 41 insertions(+), 26 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +41 -26
index 5e78dc0..eaf20bf 100644
@@ -22,31 +22,49 @@ FILES_${PN} = " \
 	${libdir}/lib*-*.so \
 	${prefix}/${TARGET_SYS}/bin/*"
 
+# Use alternatives rather than actual symlinks.
+FILES_${PN}-symlinks = ""
+
+ALLOW_EMPTY_${PN}-symlinks = "1"
+
 FILES_${PN}-dev = " \
 	${includedir} \
 	${libdir}/*.la \
 	${libdir}/libbfd.so \
 	${libdir}/libopcodes.so"
 
-FILES_${PN}-symlinks = " \
-	${bindir}/addr2line \
-	${bindir}/as \
-	${bindir}/c++filt \
-	${bindir}/embedspu \
-	${bindir}/gprof \
-	${bindir}/ld \
-	${bindir}/ld.bfd \
-	${bindir}/ld.gold \
-	${bindir}/nm \
-	${bindir}/objcopy \
-	${bindir}/objdump \
-	${bindir}/ranlib \
-	${bindir}/readelf \
-	${bindir}/elfedit \
-	${bindir}/size \
-	${bindir}/strip"
-
-FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug"
+# Rather than duplicating multiple entries for these, make one
+# list and reuse it.
+
+USE_ALTERNATIVES_FOR = " \
+	addr2line \
+	ar \
+	as \
+	c++filt \
+	elfedit \
+	gprof \
+	ld \
+	${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld.gold', 'ld.bfd', d)} \
+	nm \
+	objcopy \
+	objdump \
+	ranlib \
+	readelf \
+	size \
+	strings \
+	strip \
+"
+
+python do_package_prepend() {
+    make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
+    prefix = d.getVar("TARGET_PREFIX", True)
+    bindir = d.getVar("bindir", True)
+    for alt in make_alts.split():
+        d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt)
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt)
+}
+
+# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug"
 
 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
 
@@ -120,7 +138,9 @@ do_install () {
 		ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,`
 	done
 
-	rm -f ${D}${bindir}/ar ${D}${bindir}/strings
+        for alt in ${USE_ALTERNATIVES_FOR}; do
+                rm -f ${D}${bindir}/$alt
+        done
 
 	oe_multilib_header bfd.h
 }
@@ -129,10 +149,5 @@ inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN}-symlinks = "ar strings"
-
-ALTERNATIVE_LINK_NAME[ar] = "${bindir}/ar"
-ALTERNATIVE_TARGET[ar] = "${bindir}/${TARGET_PREFIX}ar"
+ALTERNATIVE_${PN}-symlinks_class-target = "${USE_ALTERNATIVES_FOR}"
 
-ALTERNATIVE_LINK_NAME[strings] = "${bindir}/strings"
-ALTERNATIVE_TARGET[strings] = "${bindir}/${TARGET_PREFIX}strings"
Signature · 1 line
1.7.1
#6 lore raw

Re: [PATCH 1/2] Use alternatives for the binutils-symlinks package.

Peter,

The commit short message needs to be corrected to the binutils: ... format please.

I will test this version in MUT.

Thanks
Sau!

Quoted 118 lines · Peter Seebach

The ar and strings utilities are provided as alternatives, but the rest of binutils is being done with binutils-symlinks. This has the side effect that if you want "as", and you install binutils-symlinks to get it, you don't get "ar" from it, because it's not in the symlinks package.

Solution: Use the same mechanisms for everything, putting everything in ALTERNATIVES, so installing binutils on a target produces the expected behavior of having the various utilities in place. (We do this only for class-target, though.)

Issues: The "embedspu" and "ld.gold" binaries may or may not exist, but the determination of whether to list them as alternatives is being made before the point at which we can easily check for them, so that can produce warnings.

---
  meta/recipes-devtools/binutils/binutils.inc |   67 ++++++++++++++++----------
  1 files changed, 41 insertions(+), 26 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +41 -26
index 5e78dc0..eaf20bf 100644
@@ -22,31 +22,49 @@ FILES_${PN} = " \
  	${libdir}/lib*-*.so \
  	${prefix}/${TARGET_SYS}/bin/*"
 
+# Use alternatives rather than actual symlinks.
+FILES_${PN}-symlinks = ""
+
+ALLOW_EMPTY_${PN}-symlinks = "1"
+
  FILES_${PN}-dev = " \
  	${includedir} \
  	${libdir}/*.la \
  	${libdir}/libbfd.so \
  	${libdir}/libopcodes.so"
 
-FILES_${PN}-symlinks = " \
-	${bindir}/addr2line \
-	${bindir}/as \
-	${bindir}/c++filt \
-	${bindir}/embedspu \
-	${bindir}/gprof \
-	${bindir}/ld \
-	${bindir}/ld.bfd \
-	${bindir}/ld.gold \
-	${bindir}/nm \
-	${bindir}/objcopy \
-	${bindir}/objdump \
-	${bindir}/ranlib \
-	${bindir}/readelf \
-	${bindir}/elfedit \
-	${bindir}/size \
-	${bindir}/strip"
-
-FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug"
+# Rather than duplicating multiple entries for these, make one
+# list and reuse it.
+
+USE_ALTERNATIVES_FOR = " \
+	addr2line \
+	ar \
+	as \
+	c++filt \
+	elfedit \
+	gprof \
+	ld \
+	${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld.gold', 'ld.bfd', d)} \
+	nm \
+	objcopy \
+	objdump \
+	ranlib \
+	readelf \
+	size \
+	strings \
+	strip \
+"
+
+python do_package_prepend() {
+    make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
+    prefix = d.getVar("TARGET_PREFIX", True)
+    bindir = d.getVar("bindir", True)
+    for alt in make_alts.split():
+        d.setVarFlag('ALTERNATIVE_TARGET', alt, bindir + "/" + prefix + alt)
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt)
+}
+
+# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug"
 
  B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
 
@@ -120,7 +138,9 @@ do_install () {
  		ln -sf $p `echo $p | sed -e s,${TARGET_PREFIX},,`
  	done
 
-	rm -f ${D}${bindir}/ar ${D}${bindir}/strings
+        for alt in ${USE_ALTERNATIVES_FOR}; do
+                rm -f ${D}${bindir}/$alt
+        done
 
  	oe_multilib_header bfd.h
  }
@@ -129,10 +149,5 @@ inherit update-alternatives
 
  ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN}-symlinks = "ar strings"
-
-ALTERNATIVE_LINK_NAME[ar] = "${bindir}/ar"
-ALTERNATIVE_TARGET[ar] = "${bindir}/${TARGET_PREFIX}ar"
+ALTERNATIVE_${PN}-symlinks_class-target = "${USE_ALTERNATIVES_FOR}"
 
-ALTERNATIVE_LINK_NAME[strings] = "${bindir}/strings"
-ALTERNATIVE_TARGET[strings] = "${bindir}/${TARGET_PREFIX}strings"
#7 lore raw

Re: [PATCH 1/2] Use alternatives for the binutils-symlinks package.

Quoted 2 lines · On Fri, 18 Oct 2013 22:22:40 -0700 Saul Wold <[email protected]> wrote:

The commit short message needs to be corrected to the binutils: ... format please.

Okay. Also, fray points out that I appear to have converted tabs to spaces in some shell code. I'll try to fix this in the next day or so.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#8 lore raw

Re: [PATCH 1/2] Use alternatives for the binutils-symlinks package.

In reply to Saul Wold
Quoted 2 lines · On Fri, 18 Oct 2013 22:22:40 -0700 Saul Wold <[email protected]> wrote:

The commit short message needs to be corrected to the binutils: ... format please.

Okay, corrected the commit message, also fixed a space/tab issue in the binutils.inc patch.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#9 lore raw

cover v2: Use alternatives for binutils

In reply to Saul Wold

This is a rework of a previous patch to use alternatives consistently for all of binutils instead of relying on symlinks for most things, and alternatives for ar and strings.

Changes:
1. Dropped embedspu compltely from the alternatives list. If anyone's actually using Cell processors with oe-core, or something else that needs the ability to embed SPU binaries as ELF objects in binaries for other CPUs, I'm willing to revisit that.
2. Make the selection of ld.bfd or ld.gold contingent on the presence of ld-is-gold in DISTRO_FEATURES.
3. Set the alternatives only for class-target, because otherwise we don't want or need them.

This should address failures with cross-canadian builds ("error: Can't install binutils-cross-canadian-arm-2.23.2-r4@i686_nativesdk: no package provides update-alternatives-cworth"), and warnings for the absent embedspu and ld.gold binaries, but should work for people using ld.gold.

As before, the purpose of this is mostly a cleanup, because people don't find an "as" binary, so they end up looking around and finding binutils-symlinks, then they notice that binutils-symlinks doesn't have "ar" and "strings". Confusion ensues.

The following changes since commit 24a6b1324965080fef6c363edcb37768090eebea:

wic: add pseudo to the populate-extfs step (2013-10-18 16:03:36 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib seebs/binutils-alternatives
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/binutils-alternatives

Peter Seebach (2):
Use alternatives for the binutils-symlinks package. Drop binutils-symlinks

 meta/recipes-devtools/binutils/binutils.inc |   67 +++++++++++++++------------
 1 files changed, 38 insertions(+), 29 deletions(-)
#10 lore raw

PATCH 2/2 Drop binutils-symlinks

In reply to Saul Wold

The -symlinks package doesn't really add any value if we're using update-alternatives. Drop it, leaving a spare RPROVIDES in case anyone thought they needed it.

---
 meta/recipes-devtools/binutils/binutils.inc |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +2 -8
index eaf20bf..d38c3fe 100644
@@ -15,17 +15,12 @@ DEPENDS = "flex-native bison-native zlib-native"
 
 inherit autotools gettext multilib_header
 
-PACKAGES += "${PN}-symlinks"
-
 FILES_${PN} = " \
 	${bindir}/${TARGET_PREFIX}* \
 	${libdir}/lib*-*.so \
 	${prefix}/${TARGET_SYS}/bin/*"
 
-# Use alternatives rather than actual symlinks.
-FILES_${PN}-symlinks = ""
-
-ALLOW_EMPTY_${PN}-symlinks = "1"
+RPROVIDES_${PN} += "${PN}-symlinks"
 
 FILES_${PN}-dev = " \
 	${includedir} \
@@ -149,5 +144,4 @@ inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN}-symlinks_class-target = "${USE_ALTERNATIVES_FOR}"
-
+ALTERNATIVE_${PN}_class-target = "${USE_ALTERNATIVES_FOR}"
Signature · 1 line
1.7.1