Skip to contentSkip to conversation

perl-sanity: support cpan versions of core modules

PATCH Superseded Jens Rehsack 2 participants 2 messages Apr 3, 2019 – Apr 9, 2019

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perl-sanity: support cpan versions of core modules

Most of perl core modules are dual-life modules which exists on CPAN as well as they do in perl core. Sometime, fixes are uploaded to CPAN before a new perl is released which contains the fix of the core module. Also, some modules recent releases aren't fully backported to earlier releases (out of support, lack of specific feature, ...), which makes it up to the distribution build to choose between core or CPAN version, respectively.

---
 .../perl-sanity/perl_5.28.1.bb                | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
meta/recipes-devtools/perl-sanity/perl_5.28.1.bb +33 -0
index 5aa7cd3ee1..e609c056d0 100644
@@ -172,6 +172,39 @@ perl_package_preprocess () {
             ${PKGD}${libdir}/perl5/config.sh
 }
 
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
+                     piconv pl2pm pod2html pod2man pod2text pod2usage podchecker podselect \
+                     prove ptar ptardiff ptargrep shasum splain xsubpp zipdetails"
+ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
+ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
+ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
+ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
+ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
+ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
+ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
+ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
+ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
+ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
+ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
+ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
+ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
+ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
+ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
+ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
+ALTERNATIVE_LINK_NAME[podselect] = "${bindir}/podselect"
+ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
+ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
+ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
+ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
+ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
+ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
+ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
+ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
+
 require perl-ptest.inc
 
 FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
Signature · 1 line
2.17.1
#1 lore raw

Something here isn't working quite right:

WARNING: core-image-base-1.0-r0 do_image_qa: /usr/bin/cpan is a broken link etc etc

/usr/bin/cpan is a symlink to /usr/bin/cpan.perl, which isn't in the image. In fact, it's in perl-misc:

perl-misc:

        /usr/bin/corelist.perl
        /usr/bin/cpan.perl
        /usr/bin/enc2xs.perl
        /usr/bin/encguess.perl
        /usr/bin/h2ph.perl
        /usr/bin/h2xs.perl
        /usr/bin/instmodsh.perl
        /usr/bin/json_pp.perl
        /usr/bin/libnetcfg.perl
        /usr/bin/perlbug
        /usr/bin/perldoc
        /usr/bin/perlivp
        /usr/bin/perlthanks
        /usr/bin/piconv.perl
        /usr/bin/pl2pm.perl
        /usr/bin/pod2html.perl
        /usr/bin/pod2man.perl
        /usr/bin/pod2text.perl
        /usr/bin/pod2usage.perl
        /usr/bin/podchecker.perl
        /usr/bin/podselect.perl
        /usr/bin/prove.perl
        /usr/bin/ptar.perl
        /usr/bin/ptardiff.perl
        /usr/bin/ptargrep.perl
        /usr/bin/shasum.perl
        /usr/bin/splain.perl
        /usr/bin/xsubpp.perl
        /usr/bin/zipdetails.perl

Can you fix the FILES so that the binaries go into the right packages?

Ross

Quoted 66 lines · Jens Rehsack

Most of perl core modules are dual-life modules which exists on CPAN as well as they do in perl core. Sometime, fixes are uploaded to CPAN before a new perl is released which contains the fix of the core module. Also, some modules recent releases aren't fully backported to earlier releases (out of support, lack of specific feature, ...), which makes it up to the distribution build to choose between core or CPAN version, respectively.

---
 .../perl-sanity/perl_5.28.1.bb                | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
meta/recipes-devtools/perl-sanity/perl_5.28.1.bb +33 -1
index 5aa7cd3ee1..e609c056d0 100644
@@ -172,6 +172,39 @@ perl_package_preprocess () {
             ${PKGD}${libdir}/perl5/config.sh
 }
 
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "corelist cpan enc2xs encguess h2ph h2xs instmodsh json_pp libnetcfg \
+                     piconv pl2pm pod2html pod2man pod2text pod2usage podchecker podselect \
+                     prove ptar ptardiff ptargrep shasum splain xsubpp zipdetails"
+ALTERNATIVE_LINK_NAME[corelist] = "${bindir}/corelist"
+ALTERNATIVE_LINK_NAME[cpan] = "${bindir}/cpan"
+ALTERNATIVE_LINK_NAME[enc2xs] = "${bindir}/enc2xs"
+ALTERNATIVE_LINK_NAME[encguess] = "${bindir}/encguess"
+ALTERNATIVE_LINK_NAME[h2ph] = "${bindir}/h2ph"
+ALTERNATIVE_LINK_NAME[h2xs] = "${bindir}/h2xs"
+ALTERNATIVE_LINK_NAME[instmodsh] = "${bindir}/instmodsh"
+ALTERNATIVE_LINK_NAME[json_pp] = "${bindir}/json_pp"
+ALTERNATIVE_LINK_NAME[libnetcfg] = "${bindir}/libnetcfg"
+ALTERNATIVE_LINK_NAME[piconv] = "${bindir}/piconv"
+ALTERNATIVE_LINK_NAME[pl2pm] = "${bindir}/pl2pm"
+ALTERNATIVE_LINK_NAME[pod2html] = "${bindir}/pod2html"
+ALTERNATIVE_LINK_NAME[pod2man] = "${bindir}/pod2man"
+ALTERNATIVE_LINK_NAME[pod2text] = "${bindir}/pod2text"
+ALTERNATIVE_LINK_NAME[pod2usage] = "${bindir}/pod2usage"
+ALTERNATIVE_LINK_NAME[podchecker] = "${bindir}/podchecker"
+ALTERNATIVE_LINK_NAME[podselect] = "${bindir}/podselect"
+ALTERNATIVE_LINK_NAME[prove] = "${bindir}/prove"
+ALTERNATIVE_LINK_NAME[ptar] = "${bindir}/ptar"
+ALTERNATIVE_LINK_NAME[ptardiff] = "${bindir}/ptardiff"
+ALTERNATIVE_LINK_NAME[ptargrep] = "${bindir}/ptargrep"
+ALTERNATIVE_LINK_NAME[shasum] = "${bindir}/shasum"
+ALTERNATIVE_LINK_NAME[splain] = "${bindir}/splain"
+ALTERNATIVE_LINK_NAME[xsubpp] = "${bindir}/xsubpp"
+ALTERNATIVE_LINK_NAME[zipdetails] = "${bindir}/zipdetails"
+
 require perl-ptest.inc
 
 FILES_${PN} = "${bindir}/perl ${bindir}/perl.real ${bindir}/perl${PV} ${libdir}/libperl.so* \
--

2.17.1

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