Subject: | Build Dependancies can become Unresolvable due to Name Confusion |
I was testing 0.04 by using it to generate its own ebuild, however, this
arose a sequential problem.
1. The Generated DEPENDS list is as follows, of which none exist:
DEPEND="dev-lang/perl
|| ( perl-core/CPANPLUS dev-perl/CPANPLUS perl-gcpan/CPANPLUS
perl-gcpanp/CPANPLUS )
|| ( perl-core/File-Path dev-perl/File-Path perl-gcpan/File-Path
perl-gcpanp/File-Path )
|| ( perl-core/PathTools dev-perl/PathTools perl-gcpan/PathTools
perl-gcpanp/PathTools )
|| ( perl-core/IPC-Cmd dev-perl/IPC-Cmd perl-gcpan/IPC-Cmd
perl-gcpanp/IPC-Cmd )"
So Naturally, one decides to recursively generate the dependancies to
satisfy the condition. ( Its not needed for this ebuild directly,
because its already installing fine with only 'DEPEND=""', but for other
ebuilds ? )
Now the first invocation to generate CPANPLUS resulted in the following:
[ERROR] 256 -- aborting
[ERROR] Error(s) in metadata for 'perl-gcpanp/CPANPLUS-0.84':
<snip>
invalid atom: '>=perl-core/IPC-Cmd-0.40_1'
[ERROR] Unable to create a new distribution object for 'CPANPLUS' --
cannot continue
Which is, as it says, invalid.
Generating and installing IPC::Cmd, and then regenerating CPANPLUS, made
it emit a valid atom ( Without Installing, it continues to fail).
( I know its already in core, but this is still permitted behavior )
Eventually, following the dependency branch, you end up with this. ( Run
through s/_/ /g to make it readable )
Key:
* Generated
** Generated, and all deps are already shown elsewhere on this graph
+ Available in Gentoo, not traversed
@ Available in overlay, not traversed
! Not Available, Cant be generated.
(-) cant be installed because of file collision with perl
(+) like -, but there exists a virtual to circumvent this (
virtual/perl-Module-Name)
(!) Cant be installed due to a problem in children
*(!)CPANPLUS-Dist-Gentoo:
|-*(!)CPANPLUS:
|_|-*(!)Archive::Extract:
|_|__|-*(!)File::Path:
|_|__|___|-!PathTools
|_|__|
|_|__|-!PathTools
|_|__|-*IPC::Cmd
|_|__|___|-+Locale::Maketext::Simple
|_|__|___|-*Module::Load::Conditional
|_|__|___|____|-+Locale::Maketext::Simple
|_|__|___|____|-*Module::Load
|_|__|___|____|_____|-+Test::Simple
|_|__|___|____|
|_|__|___|____|-*Params::Check
|_|__|___|____|_____|-+Locale::Maketext::Simple
|_|__|___|____|_____|-+Test::Simple
|_|__|___|____|
|_|__|___|____|-+Test::Simple
|_|__|___|____|-+version
|_|__|___|
|_|__|___|-**Params::Check
|_|__|___|-+Test::Simple
|_|__|
|_|__|-+Locale::Maketext::Simple
|_|__|-**Module::Load::Conditional
|_|__|-**Params::Check
|_|__|-+Test::Simple
|_|
|_|-+Archive::Tar
|_|-+Digest::MD5
|_|-*(!)File::Fetch
|_|__|-**(!)File::Path
|_|__|-!PathTools
|_|__|-**IPC::Cmd
|_|__|-+Locale::Maketext::Simple
|_|__|-**Module::Load::Conditional
|_|__|-**Params::Check
|_|__|-+Test::Simple
|_|
|_|-+IO::Zlib
|_|-**IPC::Cmd
|_|-+Locale::Maketext::Simple
|_|-*(!)Log::Message
|_|__|-!PathTools
|_|__|-+Locale::Maketext::Simple
|_|__|-**Module::Load
|_|__|-**Params::Check
|_|__|-+Test::Simple
|_|
|_|-@(+)Module::CoreList
|_|-**Module::Load
|_|-**Module::Load::Conditional
|_|-*Module::Loaded
|_|__|-+Test::Simple
|_|
|_|_+Module::Signature
|_|-*Object::Accessor
|_|__|-**Params::Check
|_|__|-+Test::Simple
|_|
|_|-+Package-Constants
|_|-**Params::Check
|_|-+Storable
|_|-*(!)Term::UI
|_|__|-+Locale::Maketext::Simple
|_|__|-*(!)Log::Message::Simple
|_|__|___|-**(!)Log::Message
|_|__|
|_|__|-**Params::Check
|_|__|-+Test::Simple
|_|
|_|-+Test::Harness
|_|-+Test::Simple
|_|-+version
|
|-**(!)File::Path
|-!PathTools
|-**IPC::Cmd
The problem here is mostly PathTools is not a module name,
http://search.cpan.org/~smueller/PathTools-3.29/
And that cpan2dist refuses to fetch PathTools as-is
[MSG] Checking if source files are up to date
[MSG] Retrieving /root/.cpanplus/sourcefiles.2.18.stored
[MSG] No '/root/.cpanplus/custom-sources' dir, skipping custom sources
[ERROR] 'PathTools' does not contain an author part
[ERROR] Cannot find 'PathTools' in the module tree
And, that when given a link to the actual file:
ie, cpan2dist $params
http://search.cpan.org/CPAN/authors/id/S/SM/SMUELLER/PathTools-3.29.tar.gz
It behaves as it should, downloads the file, and makes an ebuild.
However, its the wrong ebuild.
It for some reason creates perl-gcpan/File-Spec-3.29.ebuild, which makes
reasonable sense, and is already in portage,
and I'm guessing this is not the only package that behaves this way.
SUMMARY OF MY ERATIC RANTINGS:
1) When forcefully generating PathTools ( somehow ), it should have some
way of emitting a properly named ebuild.
2) Alternatively, there should be some way to create correct DEPENDS
strings that depend on the right modules. Granted this is looking to be
like a dark art because there's a great degree of inconsistency at
present how gentoo deals with bundle/distribution/modules. ( Its getting
better, but not perfect )
Other Things that cropped up in diagnosis of this problem:
1) There should be a way to depend on virtuals, if present, here's the
present list in the main line:
virtual/perl-Archive-Tar
virtual/perl-CGI
virtual/perl-Class-ISA
virtual/perl-Compress-Raw-Zlib
virtual/perl-Compress-Zlib
virtual/perl-DB_File
virtual/perl-Digest-MD5
virtual/perl-Digest-SHA
virtual/perl-ExtUtils-CBuilder
virtual/perl-ExtUtils-ParseXS
virtual/perl-File-Spec
virtual/perl-File-Temp
virtual/perl-Getopt-Long
virtual/perl-IO
virtual/perl-IO-Compress-Base
virtual/perl-IO-Compress-Zlib
virtual/perl-IO-Zlib
virtual/perl-Locale-Maketext-Simple
virtual/perl-MIME-Base64
virtual/perl-Math-BigInt
virtual/perl-Math-BigInt-FastCalc
virtual/perl-Memoize
virtual/perl-Module-Build
virtual/perl-Module-Pluggable
virtual/perl-Pod-Escapes
virtual/perl-Pod-Simple
virtual/perl-PodParser
virtual/perl-Safe
virtual/perl-Scalar-List-Utils
virtual/perl-Storable
virtual/perl-Sys-Syslog
virtual/perl-Term-ANSIColor
virtual/perl-Test
virtual/perl-Test-Harness
virtual/perl-Test-Simple
virtual/perl-Text-Balanced
virtual/perl-Time-HiRes
virtual/perl-Time-Local
virtual/perl-Time-Piece
virtual/perl-digest-base
virtual/perl-libnet
virtual/perl-locale-maketext
virtual/perl-net-ping
virtual/perl-version
These are file-less meta-packages, which are generally used to handle
the "did this module suddenly move to core" scenarios.
2) There appears to be a bit of dependency leak, stuff directly
depending on stuff that it doesn't need to depend on directly because
its children do that for it. I can't tell if this is for certain
however, its likely to be upstreams fault.
SOLUTIONS?
The most simple way to solve most of this problem, IMO, would be a
mapping file of some sort, that is consulted as an override.
A Config structure like this that could be loaded from a file and eval'd
should likely cover most uses.
my $config = {
PathTools => [
#
[ 0.0, 3.20, '>=perl-core/File-Spec-%v' ],
#
[ 3.20, 99.99, '>=dev-lang/perl-5.10' ]
],
'Module::CoreList' => [
#
[ 0.0, 99.99, 'virtual/perl-Module-CoreList' ],
],
'Foo::Bar' => "perl-gcpanp/pants"
};