Skip to contentSkip to conversation

perl/cpan issue (cpan.bbclass, perl/config.sh)

DISCUSSION Frans Meulenbroeks 2 participants 4 messages Nov 7, 2009 – Nov 10, 2009

lore
Share & tools
lore
#0 lore raw

I was trying to make xmltv but noticed some files were missing from the recipe. The recipe includes cpan

Apparently some of the files are in the xmltv work dir but others are copied to the perl work dir.
I don't think this is good, but I am not a perl/cpan expert, so seeking for advice and/or a fix.

Apparently cpan.bbclass invokes perl/config.sh
This one contains things like:
config_arg7='-Dinstallprefix=/home/frans/oe/tmp_angstrom/work/armv7a-angstrom-linux-gnueabi/perl-5.8.8-r29/image' .. installbin='/home/frans/oe/tmp_angstrom/work/armv7a-angstrom-linux-gnueabi/perl-5.8.8-r29/image/usr/bin'
...
Guess config.sh is the bad guy
Not sure how to fix this.

Please advise (or if you are a wiz, please fix and I'll study the fix and learn from it :-) )

Frans

#1 lore raw

2009/11/7 Frans Meulenbroeks <[email protected]>:

Quoted 17 lines

I was trying to make xmltv but noticed some files were missing from the recipe. The recipe includes cpan

Apparently some of the files are in the xmltv work dir but others are copied to the perl work dir.
I don't think this is good, but I am not a perl/cpan expert, so seeking for advice and/or a fix.

Apparently cpan.bbclass invokes perl/config.sh
This one contains things like:
config_arg7='-Dinstallprefix=/home/frans/oe/tmp_angstrom/work/armv7a-angstrom-linux-gnueabi/perl-5.8.8-r29/image' .. installbin='/home/frans/oe/tmp_angstrom/work/armv7a-angstrom-linux-gnueabi/perl-5.8.8-r29/image/usr/bin'
...
Guess config.sh is the bad guy
Not sure how to fix this.

Quoted 2 lines

Please advise (or if you are a wiz, please fix and I'll study the fix and learn from it :-) )

I had a fresh stab on this.
perl/config.sh gives the install dir.

config.sh is provided by the perl package but the perl recipe substitutes the destination directory @DESTDIR@ with ${D}

So basically we can either:
a) put all packages that require perl/config.sh within recipes/perl
b) use an environment var in perl/config.sh (something that can be replaced with ${D} during package build
c) have a config.sh with @DATADIR@ in it and let cpan.class replace it wtih ${D} and write to a temp.sh and execute that one (or have a sed script that replaces the vars) Note sure if that is ok, others probably also use perl/config.sh
d) in the target recipe hack the paths to the proper value using some nifty sed script.
e) the recipe copies the data from the perl image dir to its own image dir.
f) something else

Not sure how to resolve this (and most of the above is beyond my current capabilities).
Any feedback/suggestion is appreciated.

Frans

PS: and if no-one responds to this I guess I'll go for the way that is easiest for me: move the recipe to

#2 lore raw
Quoted 6 lines · Frans Meulenbroeks

I had a fresh stab on this.
perl/config.sh gives the install dir.

config.sh is provided by the perl package but the perl recipe substitutes the destination directory @DESTDIR@ with ${D}

Quoted 8 lines

So basically we can either:
a) put all packages that require perl/config.sh within recipes/perl
b) use an environment var in perl/config.sh (something that can be replaced with ${D} during package build
c) have a config.sh with @DATADIR@ in it and let cpan.class replace it wtih ${D} and write to a temp.sh and execute that one (or have a sed script that replaces the vars) Note sure if that is ok, others probably also use perl/config.sh

I'd suggest c) is most in keeping with OE and likely to work with packaged-staging and so on.

Cheers,

Richard

#3 lore raw

2009/11/10 Richard Purdie <[email protected]>:

Quoted 16 lines · Frans Meulenbroeks
Quoted 6 lines

I had a fresh stab on this.
perl/config.sh gives the install dir.

config.sh is provided by the perl package but the perl recipe substitutes the destination directory @DESTDIR@ with ${D}

Quoted 8 lines

So basically we can either:
a) put all packages that require perl/config.sh within recipes/perl
b) use an environment var in perl/config.sh (something that can be replaced with ${D} during package build
c) have a config.sh with @DATADIR@ in it and let cpan.class replace it wtih ${D} and write to a temp.sh and execute that one (or have a sed script that replaces the vars) Note sure if that is ok, others probably also use  perl/config.sh

Quoted 2 lines

I'd suggest c) is most in keeping with OE and likely to work with packaged-staging and so on.

I don't know if that breaks things because someone else uses perl/config.sh And anyway I'm not too sure on how to implement this option.

BTW meanwhile I found that if I avoid cpan and just write my own configure/build/install things also worked for me.

Frans