Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344631 - app-portage/g-cpan-0.16.2 fails to recognize Text::CSV_XS as an ebuild
Summary: app-portage/g-cpan-0.16.2 fails to recognize Text::CSV_XS as an ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 339889 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-08 05:03 UTC by gustavderdrache
Modified: 2011-01-24 05:11 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 gustavderdrache 2010-11-08 05:03:53 UTC
Attempting to install Text::CSV_XS via g-cpan yields the following error message:

>>> Verifying ebuild manifests
!!! Manifest file not found: '/usr/local/cpan-portage/perl-gcpan/Text-CSV-XS/Manifest'


It looks like g-cpan is attempting to change the '_' to a '-', which in at least this case isn't correct.

Reproducible: Always

Steps to Reproduce:
Just run `sudo g-cpan -i Text::CSV_XS'.
Actual Results:  
g-cpan chokes and reports an error message.

Expected Results:  
g-cpan should install dev-perl/Text-CSV_XS.

cpan> m Text::CSV_XS
Module id = Text::CSV_XS
    DESCRIPTION  Fast 8bit clean version of Text::CSV
    CPAN_USERID  HMBRAND (H.Merijn Brand <h.m.brand@xs4all.nl>)
    CPAN_VERSION 0.76
    CPAN_FILE    H/HM/HMBRAND/Text-CSV_XS-0.76.tgz
    UPLOAD_DATE  2010-10-13
    DSLIP_STATUS RdcOp (released,developer,C,object-oriented,Standard-Perl)
    MANPAGE      Text::CSV_XS - comma-separated values manipulation routines
    INST_FILE    /usr/lib64/perl5/vendor_perl/5.12.2/x86_64-linux-thread-multi/Text/CSV_XS.pm
    INST_VERSION 0.72
Comment 1 Dmitry Kopytov 2010-12-09 12:34:58 UTC
The same error when generating the ebuild for the package Tree::DAG_Node. It generates Tree-DAG-Node instead of Tree-DAG_Node. It seems that this applies to all package names containing '_'.
Comment 2 James A Shepherd 2011-01-23 13:35:56 UTC
I had a look at this. I managed to get the ebuild to work after hacking:

/usr/portage/eclass/perl-module.eclass

[[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && MODULE_A="${MY_P:-${P}}.tar.gz"

to

[[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && MODULE_A="${MY_P:-${P}}.tgz"


and manually changing the name of the ebuild to have the _ in it.

So, there seem to be two bugs:

the .tgz and the _

they can probably both be fixed in 

/usr/portage/eclass/perl-module.eclass
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-23 19:01:24 UTC
(In reply to comment #2)
> I had a look at this. I managed to get the ebuild to work after hacking:
> 
> /usr/portage/eclass/perl-module.eclass
> [[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && MODULE_A="${MY_P:-${P}}.tar.gz"
> to
> [[ -z "${SRC_URI}" && -z "${MODULE_A}" ]] && MODULE_A="${MY_P:-${P}}.tgz"
This change would break a lot of other dev-perl ebuilds.  The above is just the default. MODULE_A and a couple of other variables should be defined in the ebuild in this case it would be the next couple of lines however, see further below.
EAPI=2
MY_PN="Text-CSV_XS"
MY_P="${MY_PN}-${PV}"
MODULE_A="${MY_P}.tgz"
MODULE_AUTHOR="HMBRAND"
inherit perl-module

> and manually changing the name of the ebuild to have the _ in it.
tove: there doesn't seem to be any consistency in which ebuilds have "_" -> "-" in the module name. Should g-cpan be changing that "_" -> "-"?
Should we fix the following packages to get their _ back?
crypt-des-ede3 => Crypt-DES_EDE3
OLE-StorageLite => OLE-Storage_Lite
sdl-perl => SDL_Perl

> So, there seem to be two bugs:
> the .tgz and the _
> they can probably both be fixed in 
> /usr/portage/eclass/perl-module.eclass
No, they are NOT bugs in the eclass.
In the entire dev-perl, only 10 packages have .tgz extensions, 982 have .tar.gz.

P.S.
Why are you trying to use g-cpan for Text::CSV_XS when it's already in the main tree as dev-perl/Text-CSV_XS?

Comment 4 Torsten Veller (RETIRED) gentoo-dev 2011-01-23 19:52:11 UTC
(In reply to comment #3)
> P.S.
> Why are you trying to use g-cpan for Text::CSV_XS when it's already in the main
> tree as dev-perl/Text-CSV_XS?

If g-cpan installs a module which depends on Text::CSV_XS, it will generate an ebuild for Text-CSV-XS. So it happens.

> tove: there doesn't seem to be any consistency in which ebuilds have "_" -> "-"
> in the module name. Should g-cpan be changing that "_" -> "-"?

I don't know why g-cpan does this replacement.

> Should we fix the following packages to get their _ back?
> crypt-des-ede3 => Crypt-DES_EDE3
> OLE-StorageLite => OLE-Storage_Lite
> sdl-perl => SDL_Perl

I wanted to wait until we moved away from CVS before changing PNs.
But for 3+2+1 packages we could do it now if it solves the problem.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-23 21:55:23 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > in the module name. Should g-cpan be changing that "_" -> "-"?
> I don't know why g-cpan does this replacement.
Fixed in Git now.

> > Should we fix the following packages to get their _ back?
> > crypt-des-ede3 => Crypt-DES_EDE3
> > OLE-StorageLite => OLE-Storage_Lite
> > sdl-perl => SDL_Perl
> I wanted to wait until we moved away from CVS before changing PNs.
> But for 3+2+1 packages we could do it now if it solves the problem.
Ok, potentially soon.

Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-23 21:55:51 UTC
*** Bug 339889 has been marked as a duplicate of this bug. ***
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-23 22:22:38 UTC
I've covered the TGZ potion with bug 313049, where g-cpan now detects the extension (and supports a wider list).
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-24 05:11:15 UTC
0.16.3 released now.

Renames postponed till later.