Author: corsepiu Update of /cvs/pkgs/rpms/perl-DBIx-Class-Schema-Loader/devel In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18927 Modified Files: perl-DBIx-Class-Schema-Loader.spec Added Files: DBIx-Class-Schema-Loader-0.04006.diff Log Message: * Wed Aug 05 2009 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 0.04006-4 - Fix mass rebuild breakdown: Replace bundled Module-Install with Module-Install-0.91. Add --skipdeps. DBIx-Class-Schema-Loader-0.04006.diff: AutoInstall.pm | 341 ++++++++++++++++++++++++++++++++++++++++++---- Install.pm | 7 Install/Admin.pm | 294 +++++++++++++++++++++++++++++++++++++++ Install/Admin/Bundle.pm | 73 +++++++++ Install/Admin/Compiler.pm | 27 +++ Install/Admin/Find.pm | 77 ++++++++++ Install/Admin/Include.pm | 147 +++++++++++++++++++ Install/Admin/Makefile.pm | 53 +++++++ Install/Admin/Manifest.pm | 162 +++++++++++++++++++++ Install/Admin/Metadata.pm | 185 ++++++++++++++++++++++++ Install/Admin/ScanDeps.pm | 80 ++++++++++ Install/Admin/WriteAll.pm | 20 ++ Install/AutoInstall.pm | 9 - Install/Base.pm | 116 ++++++++++++--- Install/Bundle.pm | 195 ++++++++++++++++++++++++++ Install/Can.pm | 93 +++++++++++- Install/Compiler.pm | 123 ++++++++++++++++ Install/DSL.pm | 91 ++++++++++++ Install/Deprecated.pm | 115 +++++++++++++++ Install/External.pm | 138 ++++++++++++++++++ Install/Fetch.pm | 9 - Install/Include.pm | 9 - Install/Inline.pm | 49 ++++++ Install/MakeMaker.pm | 49 ++++++ Install/Makefile.pm | 140 +++++++++++++++++- Install/Metadata.pm | 105 +++++++++----- Install/PAR.pm | 274 ++++++++++++++++++++++++++++++++++++ Install/Philosophy.pod | 187 +++++++++++++++++++++++++ Install/Run.pm | 15 ++ Install/Scripts.pm | 28 +++ Install/Share.pm | 125 ++++++++++++++++ Install/Win32.pm | 7 Install/With.pm | 159 +++++++++++++++++++++ Install/WriteAll.pm | 19 +- 34 files changed, 3395 insertions(+), 126 deletions(-) --- NEW FILE DBIx-Class-Schema-Loader-0.04006.diff --- diff -Naur DBIx-Class-Schema-Loader-0.04006.orig/inc/Module/AutoInstall.pm DBIx-Class-Schema-Loader-0.04006/inc/Module/AutoInstall.pm --- DBIx-Class-Schema-Loader-0.04006.orig/inc/Module/AutoInstall.pm 2009-05-01 22:10:12.000000000 +0200 +++ DBIx-Class-Schema-Loader-0.04006/inc/Module/AutoInstall.pm 2009-05-27 18:46:13.000000000 +0200 @@ -1,4 +1,3 @@ -#line 1 package Module::AutoInstall; use strict; @@ -18,7 +17,9 @@ # various lexical flags my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $HasCPANPLUS ); -my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly ); +my ( + $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps +); my ( $PostambleActions, $PostambleUsed ); # See if it's a testing or non-interactive session @@ -73,6 +74,9 @@ elsif ( $arg =~ /^--test(?:only)?$/ ) { $TestOnly = 1; } + elsif ( $arg =~ /^--all(?:deps)?$/ ) { + $AllDeps = 1; + } } } @@ -115,7 +119,12 @@ )[0] ); - $UnderCPAN = _check_lock(1); # check for $UnderCPAN + # We want to know if we're under CPAN early to avoid prompting, but + # if we aren't going to try and install anything anyway then skip the + # check entirely since we don't want to have to load (and configure) + # an old CPAN just for a cosmetic message + + $UnderCPAN = _check_lock(1) unless $SkipInstall; while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) { my ( @required, @tests, @skiptests ); @@ -165,15 +174,24 @@ } # XXX: check for conflicts and uninstalls(!) them. - if ( - defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) ) + my $cur = _load($mod); + if (_version_cmp ($cur, $arg) >= 0) { print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n"; push @Existing, $mod => $arg; $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; } else { - print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n"; + if (not defined $cur) # indeed missing + { + print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n"; + } + else + { + # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above + print "too old. ($cur < $arg)\n"; + } + push @required, $mod => $arg; } } @@ -187,6 +205,7 @@ and ( $CheckOnly or ($mandatory and $UnderCPAN) + or $AllDeps or _prompt( qq{==> Auto-install the } . ( @required / 2 ) @@ -235,21 +254,38 @@ *{'main::WriteMakefile'} = \&Write if caller(0) eq 'main'; } +sub _running_under { + my $thing = shift; + print <<"END_MESSAGE"; +*** Since we're running under ${thing}, I'll just let it take care + of the dependency's installation later. +END_MESSAGE + return 1; +} + # Check to see if we are currently running under CPAN.pm and/or CPANPLUS; # if we are, then we simply let it taking care of our dependencies sub _check_lock { return unless @Missing or @_; + my $cpan_env = $ENV{PERL5_CPAN_IS_RUNNING}; + if ($ENV{PERL5_CPANPLUS_IS_RUNNING}) { - print <<'END_MESSAGE'; + return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS'); + } -*** Since we're running under CPANPLUS, I'll just let it take care - of the dependency's installation later. -END_MESSAGE - return 1; + require CPAN; + + if ($CPAN::VERSION > '1.89') { + if ($cpan_env) { + return _running_under('CPAN'); + } + return; # CPAN.pm new enough, don't need to check further } - _load_cpan(); + # last ditch attempt, this -will- configure CPAN, very sorry + + _load_cpan(1); # force initialize even though it's already loaded # Find the CPAN lock-file my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" ); @@ -285,7 +321,7 @@ while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) { # grep out those already installed - if ( defined( _version_check( _load($pkg), $ver ) ) ) { + if ( _version_cmp( _load($pkg), $ver ) >= 0 ) { push @installed, $pkg; } else { @@ -324,7 +360,7 @@ # see if we have successfully installed them while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { - if ( defined( _version_check( _load($pkg), $ver ) ) ) { + if ( _version_cmp( _load($pkg), $ver ) >= 0 ) { push @installed, $pkg; } elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) { @@ -379,7 +415,7 @@ my $success; my $obj = $modtree->{$pkg}; - if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) { + if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) { my $pathname = $pkg; $pathname =~ s/::/\\W/; @@ -472,7 +508,7 @@ my $obj = CPAN::Shell->expand( Module => $pkg ); my $success = 0; - if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) { + if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) { my $pathname = $pkg; $pathname =~ s/::/\\W/; @@ -536,7 +572,7 @@ my $ver = shift; return - if defined( _version_check( _load($class), $ver ) ); # no need to upgrade + if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade if ( _prompt( "==> A newer version of $class ($ver) is required. Install?", @@ -633,7 +669,7 @@ # Load CPAN.pm and it's configuration sub _load_cpan { - return if $CPAN::VERSION; + return if $CPAN::VERSION and $CPAN::Config and not @_; require CPAN; if ( $CPAN::HandleConfig::VERSION ) { # Newer versions of CPAN have a HandleConfig module @@ -645,9 +681,11 @@ } # compare two versions, either use Sort::Versions or plain comparison -sub _version_check { +# return values same as <=> +sub _version_cmp { my ( $cur, $min ) = @_; - return unless defined $cur; + return -1 unless defined $cur; # if 0 keep comparing + return 1 unless $min; $cur =~ s/\s+$//; @@ -658,16 +696,13 @@ ) { # use version.pm if it is installed. - return ( - ( version->new($cur) >= version->new($min) ) ? $cur : undef ); + return version->new($cur) <=> version->new($min); [...3605 lines suppressed...] + + +##################################################################### +# Testing and Configuration Contexts + +=pod + +=head2 interactive + +The C<interactive> function tests for an install that has a user present +(or at least, one in which it is reasonable for us to present prompts +and other similar types of things). + +Returns true if in an interactive environment, or false otherwise. + +=cut + +sub interactive { + # Treat things interactively ONLY based on input + !! (-t STDIN and ! automated_testing()); +} + +=pod + +=head2 automated_testing + +Are we currently running in an automated testing environment, such as +CPAN Testers. + +This is primarily a cleaner and more human-readable equivalent of +checking $ENV{AUTOMATED_TESTING} yourself, but may be improved in line +with best practices at a later date. + +=cut + +sub automated_testing { + !! $ENV{AUTOMATED_TESTING}; +} + +=pod + +=head2 release_testing + +Are we currently running in an release testing environment. That is, +are we in the process of running in a potential highly-intensive and +high dependency bloat testing process prior to packaging a module for +release. + +This is primarily a cleaner and more human-readable equivalent of +checking $ENV{RELEASE_TESTING} yourself, but may be improved in line +with best practices at a later date. + +=cut + +sub release_testing { + !! $ENV{RELEASE_TESTING}; +} + +sub author_context { + !! $Module::Install::AUTHOR; +} + + + + + +##################################################################### +# Operating System Convenience + +=pod + +=head2 win32 + +The C<win32> function tests if the Makefile.PL is currently running in a +native Microsoft Windows Perl, such as ActivePerl or Strawberry Perl. + +This is primarily a cleaner and more human-readable equivalent of +checking C<$^O eq 'MSWin32'> yourself, but may be improved in line +with best practices at a later date. + +=cut + +sub win32 { + !! ($^O eq 'MSWin32'); +} + +=pod + +=head2 winlike + +The C<winlike> function tests if the Makefile.PL is currently running +in a Microsoft Windows Perl, under either cygwin or a native Win32 Perl. + +This is primarily a cleaner and more human-readable equivalent of +checking C<$^O eq 'MSWin32' or $^O eq 'cygwin'>yourself, but may be +improved in line with best practices at a later date. + +=cut + +sub winlike { + !! ($^O eq 'MSWin32' or $^O eq 'cygwin'); +} + +1; + +=pod + +=head1 SEE ALSO + +L<Module::Install> + +=head1 AUTHORS + +Adam Kennedy E<lt>adamk@xxxxxxxxx<gt> + +=head1 COPYRIGHT + +Copyright 2007 - 2009 Adam Kennedy. + +This program is free software; you can redistribute +it and/or modify it under the same terms as Perl itself. + +The full text of the license can be found in the +LICENSE file included with this module. + +=cut diff -Naur DBIx-Class-Schema-Loader-0.04006.orig/inc/Module/Install/WriteAll.pm DBIx-Class-Schema-Loader-0.04006/inc/Module/Install/WriteAll.pm --- DBIx-Class-Schema-Loader-0.04006.orig/inc/Module/Install/WriteAll.pm 2009-05-01 22:10:12.000000000 +0200 +++ DBIx-Class-Schema-Loader-0.04006/inc/Module/Install/WriteAll.pm 2009-05-27 18:46:13.000000000 +0200 @@ -1,12 +1,11 @@ -#line 1 package Module::Install::WriteAll; use strict; -use Module::Install::Base; +use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '0.85'; + $VERSION = '0.91';; @ISA = qw{Module::Install::Base}; $ISCORE = 1; } @@ -41,8 +40,18 @@ # The Makefile write process adds a couple of dependencies, # so write the META.yml files after the Makefile. - $self->Meta->write if $args{meta}; - $self->Meta->write_mymeta if $self->mymeta; + if ( $args{meta} ) { + $self->Meta->write; + } + + # Experimental support for MYMETA + if ( $ENV{X_MYMETA} ) { + if ( $ENV{X_MYMETA} eq 'JSON' ) { + $self->Meta->write_mymeta_json; + } else { + $self->Meta->write_mymeta_yaml; + } + } return 1; } diff -Naur DBIx-Class-Schema-Loader-0.04006.orig/inc/Module/Install.pm DBIx-Class-Schema-Loader-0.04006/inc/Module/Install.pm --- DBIx-Class-Schema-Loader-0.04006.orig/inc/Module/Install.pm 2009-05-01 22:10:11.000000000 +0200 +++ DBIx-Class-Schema-Loader-0.04006/inc/Module/Install.pm 2009-05-27 18:46:13.000000000 +0200 @@ -1,4 +1,3 @@ -#line 1 package Module::Install; # For any maintainers: @@ -28,7 +27,7 @@ # This is not enforced yet, but will be some time in the next few # releases once we can make sure it won't clash with custom # Module::Install extensions. - $VERSION = '0.85'; + $VERSION = '0.91'; # Storage for the pseudo-singleton $MAIN = undef; @@ -353,7 +352,7 @@ if ( $] >= 5.006 ) { open( FH, '<', $_[0] ) or die "open($_[0]): $!"; } else { - open( FH, "< $_[0]" ) or die "open($_[0]): $!"; + open( FH, "< $_[0]" ) or die "open($_[0]): $!"; } my $string = do { local $/; <FH> }; close FH or die "close($_[0]): $!"; @@ -384,7 +383,7 @@ if ( $] >= 5.006 ) { open( FH, '>', $_[0] ) or die "open($_[0]): $!"; } else { - open( FH, "> $_[0]" ) or die "open($_[0]): $!"; + open( FH, "> $_[0]" ) or die "open($_[0]): $!"; } foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!"; Index: perl-DBIx-Class-Schema-Loader.spec =================================================================== RCS file: /cvs/pkgs/rpms/perl-DBIx-Class-Schema-Loader/devel/perl-DBIx-Class-Schema-Loader.spec,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- perl-DBIx-Class-Schema-Loader.spec 26 Jul 2009 05:24:03 -0000 1.6 +++ perl-DBIx-Class-Schema-Loader.spec 5 Aug 2009 05:17:48 -0000 1.7 @@ -1,11 +1,14 @@ Name: perl-DBIx-Class-Schema-Loader Version: 0.04006 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Dynamic definition of a DBIx::Class::Schema License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/DBIx-Class-Schema-Loader/ Source0: http://search.cpan.org/CPAN/authors/id/I/IL/ILMARI/DBIx-Class-Schema-Loader-%{version}.tar.gz + +# Broken Module-Install, replace with Module-Install-0.91 +Patch0: DBIx-Class-Schema-Loader-0.04006.diff BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) @@ -18,6 +21,7 @@ BuildRequires: perl(File::Spec) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Test::More) >= 0.47 BuildRequires: perl(Text::Balanced) +BuildRequires: perl(YAML::Tiny), perl(File::Remove) # cpan BuildRequires: perl(Carp::Clan) @@ -49,6 +53,7 @@ and setting up the columns, primary keys %prep %setup -q -n DBIx-Class-Schema-Loader-%{version} +%patch0 -p1 # make sure doc/tests don't generate provides # note we first filter out the bits in _docdir... @@ -69,7 +74,7 @@ EOF chmod +x %{__perl_requires} %build -echo n | %{__perl} Makefile.PL INSTALLDIRS=vendor +%{__perl} Makefile.PL INSTALLDIRS=vendor --skipdeps make %{?_smp_mflags} %install @@ -95,6 +100,11 @@ rm -rf %{buildroot} %{_mandir}/man3/* %changelog +* Wed Aug 05 2009 Ralf Corsépius <corsepiu@xxxxxxxxxxxxxxxxx> - 0.04006-4 +- Fix mass rebuild breakdown: + Replace bundled Module-Install with Module-Install-0.91. + Add --skipdeps. + * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.04006-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl Fedora-perl-devel-list mailing list Fedora-perl-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list