Skip to contentSkip to conversation

libio-compress-perl: Use update alternatives for streamzip and zipdetails

PATCH New Khem Raj 1 participant 1 message Jun 15, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 libio-compress-perl: Use update alternatives for streamzip and zipdetails

these utilities are also provided by perl-misc package built by perl recipe. Prefer the one's provided by libio-compress-perl if its included.

Fixes https://github.com/riscv/meta-riscv/issues/374

---
 meta-perl/recipes-perl/libio/libio-compress-perl_2.212.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta-perl/recipes-perl/libio/libio-compress-perl_2.212.bb +8 -0
index bb4013ae5a..ca04ffc8ef 100644
@@ -38,4 +38,12 @@ RDEPENDS:${PN} += "\
     libcompress-raw-zlib-perl \
 "
 
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "39"
+
+ALTERNATIVE:${PN} = "streamzip zipdetails"
+ALTERNATIVE_LINK_NAME[streamzip] = "${bindir}/streamzip"
+ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
+
 BBCLASSEXTEND = "native"