Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 210545 - g-cpan package collision failure when same package provided by master list
Summary: g-cpan package collision failure when same package provided by master list
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Other Linux
: High minor (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-17 23:49 UTC by Mathew Robertson
Modified: 2011-01-24 07:33 UTC (History)
0 users

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 Mathew Robertson 2008-02-17 23:49:38 UTC
g-cpan will create a local package of the corresponding CPAN module.  Sometimes an ebuild for this package is added to the master list.   When installing some other package that depends on this duplicated package, both instances of the packages are found by portage's dependency tracking, as can be seen from the following error message:

!!! Problem in 'perl-gcpan/Locale-MakePhrase' dependencies.
!!! ['dev-perl/JSON', 'perl-gcpan/JSON'] None
Traceback (most recent call last):
  File "/usr/bin/emerge", line 6971, in <module>
    retval = emerge_main()
  File "/usr/bin/emerge", line 6965, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 6232, in action_build
    retval, favorites = mydepgraph.select_files(myfiles)
  File "/usr/bin/emerge", line 2078, in select_files
    self.mysd = self.select_dep(myroot, myatom, arg=myarg)
  File "/usr/bin/emerge", line 2437, in select_dep
    metadata=selected_pkg[1], rev_dep=rev_deps, arg=arg):
  File "/usr/bin/emerge", line 1785, in create
    portdb.xmatch("match-all", arg) and
  File "/usr/lib/portage/pym/portage.py", line 7365, in xmatch
    mydep = dep_expand(origdep, mydb=self, settings=self.mysettings)
  File "/usr/lib/portage/pym/portage.py", line 5359, in dep_expand
    mydep, mydb=mydb, use_cache=use_cache, settings=settings) + postfix
  File "/usr/lib/portage/pym/portage.py", line 5583, in cpv_expand
    raise ValueError, matches
ValueError: ['dev-perl/JSON', 'perl-gcpan/JSON']


The hack solution is to delete the perl-cpan package; however, that implies we dont need to use the newer version of the package available in perl-gcpan.

Note that this occurs during "g-cpan -u" so it halts the update.

Tracing through portage.py at those line numbers, shows that portage is already handling a similar case when a duplicate package exists for the "virtuals" packages -> looks like it probably needs to either a) also handle "gcpan" packages, or b) the better solution would be to use the versions from both packages and preferring to use the global version if there is a duplicate.

Reproducible: Always

Steps to Reproduce:
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-15 03:59:25 UTC
What package did you run into this on in the first place, so I can test.

If a newer version of a dev-perl package is needed, g-cpan should probably make it, under the dev-perl category, in the overlay.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-24 07:33:52 UTC
No response from user after nearly 1 year.