Subject: | goto broke dependency handling |
Date: | Thu, 23 Jan 2014 16:23:41 +0000 |
To: | bug-CPAN [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
On a large cpan(1) run, I've seen some broken dependency handling
that I suspect is linked to the use of a "goto" distropref. One of
the things I try to install is DBIx::Class. DBIx-Class has many
dependencies, including SQL::Abstract. I have a distropref to downgrade
SQL-Abstract-1.77 to SQL-Abstract-1.75, because 1.77 causes a DBIx-Class
test to falsely fail. DBIx-Class and SQL-Abstract both depend on
Class::Accessor::Grouped.
When building from a clean installation, DBIx-Class configures and
declares a bunch of unmet dependencies:
Warning: prerequisite Class::Accessor::Grouped 0.10010 not found.
Warning: prerequisite Class::C3::Componentised 1.0009 not found.
Warning: prerequisite Config::Any 0.20 not found.
Warning: prerequisite Context::Preserve 0.01 not found.
Warning: prerequisite Data::Compare 1.22 not found.
Warning: prerequisite Data::Dumper::Concise 2.020 not found.
Warning: prerequisite Data::Page 2.00 not found.
Warning: prerequisite Module::Find 0.07 not found.
Warning: prerequisite SQL::Abstract 1.73 not found.
Warning: prerequisite Scope::Guard 0.03 not found.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for DBIx::Class
Writing MYMETA.yml and MYMETA.json
RIBASUSHI/DBIx-Class-0.08250.tar.gz
/opt/perl-5.19.8/bin/perl Makefile.PL -- OK
Running make for R/RI/RIBASUSHI/DBIx-Class-0.08250.tar.gz
Show quoted text
---- Unsatisfied dependencies detected during ----
---- RIBASUSHI/DBIx-Class-0.08250.tar.gz ----
Data::Page [requires]
Config::Any [requires]
Data::Dumper::Concise [requires]
Context::Preserve [requires]
Scope::Guard [requires]
Data::Compare [requires]
SQL::Abstract [requires]
Module::Find [requires]
Class::C3::Componentised [requires]
Class::Accessor::Grouped [requires]
CPAN.pm then goes off to install these dependencies, starting with
Data::Page. When it gets to SQL::Abstract, it follows the downgrade,
and picks up SQL-Abstract's unmet deps:
______________________ D i s t r o P r e f s ______________________
SQL-Abstract-downgrade.yml[0]
RIBASUSHI/SQL-Abstract-1.77.tar.gz
[goto] -- NA Goto 'R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz' via prefs file '/Babels/hk/perl/cpan/prefs/SQL-Abstract-downgrade.yml' doc 0
Fetching with LWP:
ftp://ftp.cs.uu.nl/pub/CPAN/authors/id/R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz
Checksum for /opt/perl-5.19.8/cpan/sources/authors/id/R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz ok
Configuring R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz with Makefile.PL
*** Module::AutoInstall version 1.06
*** Checking for Perl dependencies...
*** Since we're running under CPAN, I'll just let it take care
of the dependency's installation later.
[Core Features]
- Test::More ...loaded. (1.001002 >= 0.92)
- Test::Exception ...loaded. (0.32)
- Test::Warn ...loaded. (0.24)
- Test::Deep ...loaded. (0.112 >= 0.101)
- Storable ...loaded. (2.48)
- List::Util ...loaded. (1.36)
- Scalar::Util ...loaded. (1.36)
- Class::Accessor::Grouped ...missing. (would need 0.10005)
- Getopt::Long::Descriptive ...loaded. (0.096 >= 0.091)
- Hash::Merge ...loaded. (0.200 >= 0.12)
*** Module::AutoInstall configuration finished.
Warning: prerequisite Class::Accessor::Grouped 0.10005 not found.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for SQL::Abstract
Writing MYMETA.yml and MYMETA.json
RIBASUSHI/SQL-Abstract-1.75.tar.gz
/opt/perl-5.19.8/bin/perl Makefile.PL -- OK
Running make for R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz
---- Unsatisfied dependencies detected during ----
---- RIBASUSHI/SQL-Abstract-1.75.tar.gz ----
Class::Accessor::Grouped [requires]
It then installs Class::Accessor::Grouped and its dependency. Then it
returns to SQL-Abstract, and this is where things get weird:
RIBASUSHI/Class-Accessor-Grouped-0.10010.tar.gz
/usr/bin/make install -- OK
RIBASUSHI/SQL-Abstract-1.75.tar.gz
Has already been unwrapped into directory /opt/perl-5.19.8/cpan/build/SQL-Abstract-1.75-1ilikT
RIBASUSHI/SQL-Abstract-1.75.tar.gz
Has already been prepared
Running make for R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz
cp lib/DBIx/Class/Storage/Debug/PrettyPrint.pm blib/lib/DBIx/Class/Storage/Debug/PrettyPrint.pm
cp lib/SQL/Abstract/Test.pm blib/lib/SQL/Abstract/Test.pm
cp lib/SQL/Abstract.pm blib/lib/SQL/Abstract.pm
cp lib/SQL/Abstract/Tree.pm blib/lib/SQL/Abstract/Tree.pm
cp script/format-sql blib/script/format-sql
/opt/perl-5.19.8/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/format-sql
Manifying blib/man3/DBIx::Class::Storage::Debug::PrettyPrint.3
Manifying blib/man3/SQL::Abstract.3
Manifying blib/man3/SQL::Abstract::Test.3
Manifying blib/man3/SQL::Abstract::Tree.3
RIBASUSHI/SQL-Abstract-1.75.tar.gz
/usr/bin/make -- OK
RIBASUSHI/SQL-Abstract-1.75.tar.gz
Delayed until after prerequisites
RIBASUSHI/SQL-Abstract-1.75.tar.gz
Delayed until after prerequisites
Running install for module 'Module::Find'
Fetching with LWP:
ftp://ftp.cs.uu.nl/pub/CPAN/authors/id/C/CR/CRENZ/Module-Find-0.11.tar.gz
So it built SQL-Abstract OK, but didn't test or install it, saying these
steps are "Delayed until after prerequisites". But all of SQL-Abstract's
dependencies have been met, so this is bogus. Apparently it recognises
that there are no more SQL-Abstract deps to process, because the
next thing it does is unrelated to SQL-Abstract; it's the next dep
of DBIx-Class.
After all the remaining DBIx-Class deps have been installed, CPAN.pm then
returns to processing DBIx-Class, *without having finished installing
SQL-Abstract*:
FREW/Class-C3-Componentised-1.001000.tar.gz
/usr/bin/make install -- OK
Class::Accessor::Grouped is up to date (0.10010).
RIBASUSHI/DBIx-Class-0.08250.tar.gz
Has already been unwrapped into directory /opt/perl-5.19.8/cpan/build/DBIx-Class-0.08250-m4wSN9
RIBASUSHI/DBIx-Class-0.08250.tar.gz
Has already been prepared
Running make for R/RI/RIBASUSHI/DBIx-Class-0.08250.tar.gz
Warning: Prerequisite 'SQL::Abstract => 1.73' for 'RIBASUSHI/DBIx-Class-0.08250.tar.gz' failed when processing 'RIBASUSHI/SQL-Abstract-1.77.tar.gz' with 'unwrapped => NO Goto 'R/RI/RIBASUSHI/SQL-Abstract-1.75.tar.gz' via prefs file '/Babels/hk/perl/cpan/prefs/SQL-Abstract-downgrade.yml' doc 0'. Continuing, but chances to succeed are limited.
Duly DBIx-Class then fails its tests.
Result: FAIL
Failed 185/288 test programs. 18/14053 subtests failed.
make: *** [test_dynamic] Error 255
RIBASUSHI/DBIx-Class-0.08250.tar.gz
one dependency not OK (SQL::Abstract); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports RIBASUSHI/DBIx-Class-0.08250.tar.gz
Various later modules requested on the command line, depending on
DBIx::Class, inevitably fail.
Warning: Prerequisite 'DBIx::Class => 0.08009' for 'GRAF/DBIx-Class-RandomColumns-0.005001.tar.gz' failed when processing 'RIBASUSHI/DBIx-Class-0.08250.tar.gz' with 'make_test => NO one dependency not OK (SQL::Abstract); additionally test harness failed'. Continuing, but chances to succeed are limited.
CPAN.pm never attempts to finish installing SQL-Abstract during this run.
However, if I then invoke cpan(1) again with the same module list,
it ultimately succeeds. The second time round, SQL::Abstract is the
only unmet dependency of DBIx-Class, and SQL-Abstract's dependencies
are all already met. The downgrade is applied, and SQL-Abstract gets
consecutively configured, built, tested, and installed. DBIx-Class is
then satisfied.
The only really unusual (and the only new) part of this setup is the
goto distropref on SQL-Abstract. There are patching distroprefs on other
distros, including on DBIx-Class. I've used patch distroprefs extensively
without difficulty, and this dependency graph hasn't previously caused
trouble. So I'm tentatively blaming this problem on the goto distropref.
The "NA" that appears whenever the goto is processed has me a bit
concerned, because it matches the keyword for a pseudo-failing test.
-zefram