Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 545304 - sci-biology/vcftools installs env.d file setting PERL5LIB, clashes with recent perl-module.eclass
Summary: sci-biology/vcftools installs env.d file setting PERL5LIB, clashes with recen...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-02 09:53 UTC by Andreas K. Hüttel
Modified: 2015-04-04 08:32 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K. Hüttel archtester gentoo-dev 2015-04-02 09:53:20 UTC
sci-biology/vcftools/vcftools-0.1.8.ebuild

        echo 'COLON_SEPARATED=PERL5LIB' > "${S}/99${PN}"
        echo "PERL5LIB=/usr/share/${PN}/perl" >> "${S}/99${PN}"
        doenvd "${S}/99${PN}"

Need to come up with a solution for this, either for the package or for the eclass.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2015-04-03 15:32:40 UTC
I've bumped vcftools 0.1.12b, the new ebuild
* installs executable perl scripts into /usr/bin
* installs the perl modules into ${VENDOR_DIR}
* does not install any env.d file anymore

Please give it a try and tell me if it works as expected.
Comment 2 Martin Mokrejš 2015-04-03 17:10:58 UTC
OK, seems to work ( from http://vcftools.sourceforge.net/perl_examples.html#validator ):

vcf-validator  -h

perl -MVcf -e validate example.vcf

vcf-validator example.vcf




Isn't site-lib perl path a better place? I just cannot find the directory on my system anymore ...
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2015-04-03 17:16:35 UTC
> Isn't site-lib perl path a better place? I just cannot find the directory on
> my system anymore ...

perl -V:sitelibexp -V:vendorlibexp 
sitelibexp='/usr/local/lib64/perl5/5.20.2';
vendorlibexp='/usr/lib64/perl5/vendor_perl/5.20.2';


sitelib is for "user maintained"  ( ie: if you use CPAN.pm and stuff , which you probably shouldn't, ... but its there anyway )

vendorlib is for "vendor maintained"

Gentoo packages fall into the latter category.
Comment 4 Martin Mokrejš 2015-04-03 17:30:45 UTC
OK, thanks. These all need cleanup, for some I add more details:

sci-biology/meme-4.8.1-r2 -- installed /usr/lib64/perl/*.pm
sci-biology/pairagon
sci-biology/amos -- /usr/share/amos/perl/{AMOS,TIGR}/*.pm
sci-biology/transdecoder 
sci-biology/augustus -- /usr/libexec/augustus/*.pm

Probably a lot more to appear when you do a check programmatically. Note some probably cannot install automagically via "inherit perl-module" because they need to get configured/compiled and the perl-related files are just some add-on tools. I think you will have fun with those above. ;)
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2015-04-03 19:12:24 UTC
(In reply to Martin Mokrejš from comment #4)
> OK, thanks. These all need cleanup, for some I add more details:
> 
> sci-biology/meme-4.8.1-r2 -- installed /usr/lib64/perl/*.pm
> sci-biology/pairagon
> sci-biology/amos -- /usr/share/amos/perl/{AMOS,TIGR}/*.pm
> sci-biology/transdecoder 
> sci-biology/augustus -- /usr/libexec/augustus/*.pm
> 
> Probably a lot more to appear when you do a check programmatically. Note
> some probably cannot install automagically via "inherit perl-module" because
> they need to get configured/compiled and the perl-related files are just
> some add-on tools. I think you will have fun with those above. ;)

Most times it's pretty simple (worst case we add a "mv a b" in src_install).
You can have a look at the newest vcftools ebuild on how to do it "manually". I'm explicitly not using the perl-module_... ebuild phases, but still use the eclass for getting the proper directory. 

But this is getting offtopic here. If you want to help, please use separate bugs per package. Thanks a lot!!!
Comment 6 Martin Mokrejš 2015-04-04 08:32:07 UTC
I wonder why you did not summarize what changes happened to the "API" which ebuild writers should follow. I would even ask for several anticipated typical usage examples. ;-))
Luckily I am not a developer so I can ignore that and leave the burden on Justin. ;) Would I be, I would ask you to fix the few named packages to show what changes are needed while hoping the process will be simplified further. Don't know if I will memorize the PERL_EXPORT_PHASE_FUNCTIONS line and why perl_set_version needs to be called.


For completeness (in my eyes) I better add here what you did:

@@ -1,10 +1,11 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/vcftools/vcftools-0.1.8.ebuild,v 1.2 2013/02/27 16:39:18 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/vcftools/vcftools-0.1.12b.ebuild,v 1.1 2015/04/03 15:31:25 dilfridge Exp $
 
-EAPI=4
+EAPI=5
 
-inherit eutils toolchain-funcs
+PERL_EXPORT_PHASE_FUNCTIONS=no
+inherit perl-module eutils toolchain-funcs
 
 MY_P="${PN}_${PV}"
 
@@ -12,7 +13,7 @@
 HOMEPAGE="http://vcftools.sourceforge.net/"
 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
 
-LICENSE="GPL-3"
+LICENSE="LGPL-3"
 SLOT="0"
 KEYWORDS="~x86 ~amd64"
 IUSE="lapack"
@@ -35,13 +36,10 @@
 }
 
 src_install(){
+       perl_set_version
        dobin cpp/${PN}
-       insinto /usr/share/${PN}/perl
+       insinto ${VENDOR_LIB}
        doins perl/*.pm
-       exeinto /usr/share/${PN}/perl
-       doexe perl/{fill,vcf}-*
-       echo 'COLON_SEPARATED=PERL5LIB' > "${S}/99${PN}"
-       echo "PERL5LIB=/usr/share/${PN}/perl" >> "${S}/99${PN}"
-       doenvd "${S}/99${PN}"
+       dobin perl/{fill,vcf}-*
        dodoc README.txt
 }


I bet nevertheless somebody will check systematically the portage tree to "fix" other packages installing env.d files, as this is enforced now by changes mentioned in bug #543042. In the end, it is up to you, devs, to crosstalk your changes.

But thank you for your quick action, Andreas. I might get back to this but time is limiting.