Group :: Development/Perl
RPM: perl-Module-Install
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: perl-Module-Install-1.02-alt1.patch
Download
Download
.gear/rules | 2 +
.../tags/461f670f40a0a5d59ec45cc8b0030e4f88461350 | 13 +++
.gear/tags/list | 1 +
Makefile.PL | 10 +-
inc/Module/Install/Metadata.pm | 2 +-
lib/Module/AutoInstall.pm | 15 +++-
lib/Module/Install/Admin/Bundle.pm | 7 +-
lib/Module/Install/Admin/Compiler.pm | 3 +-
lib/Module/Install/Admin/Include.pm | 4 +-
lib/Module/Install/Admin/Metadata.pm | 14 ----
lib/Module/Install/Admin/ScanDeps.pm | 4 +
lib/Module/Install/Can.pm | 3 +
lib/Module/Install/Makefile.pm | 18 -----
lib/Module/Install/Metadata.pm | 2 +-
lib/Module/Install/With.pm | 1 -
perl-Module-Install.spec | 80 ++++++++++++++++++++
t/12_eumm_params.t | 11 +---
t/25_perl_version_from.t | 2 +-
t/27_build_requires_and_include.t | 3 +
19 files changed, 135 insertions(+), 60 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..95ffa7c
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: @version@:. name=Module-Install-@version@
+diff: @version@:. . name=perl-Module-Install-@version@-@release@.patch
diff --git a/.gear/tags/461f670f40a0a5d59ec45cc8b0030e4f88461350 b/.gear/tags/461f670f40a0a5d59ec45cc8b0030e4f88461350
new file mode 100644
index 0000000..39c6510
--- /dev/null
+++ b/.gear/tags/461f670f40a0a5d59ec45cc8b0030e4f88461350
@@ -0,0 +1,13 @@
+object 1b380ac7e27ec41810e6efe4619f3c68b837e849
+type commit
+tag 1.02
+tagger Alexey Tourbin <at@altlinux.ru> 1317793432 +0400
+
+1.02
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+iEYEABECAAYFAk6L7pgACgkQfBKgtDjnu0bSUQCgz7WG2o4whYJA0jvyJrnQ4sR9
+sw0An19M+EEo8QYAYh1tba8QZGgWL+tG
+=TFq4
+-----END PGP SIGNATURE-----
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..2e9f2d1
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+461f670f40a0a5d59ec45cc8b0030e4f88461350 1.02
diff --git a/Makefile.PL b/Makefile.PL
index aa7c6d0..d6c0b5f 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -26,14 +26,14 @@ requires 'Devel::PPPort' => '3.16';
requires 'File::Remove' => '1.42';
requires 'YAML::Tiny' => '1.38';
requires 'JSON' => '2.14';
-requires 'Module::ScanDeps' => '0.89';
-requires 'Module::CoreList' => '2.17';
-requires 'PAR::Dist' => '0.29';
-requires 'Archive::Tar' => '1.44';
+recommends 'Module::ScanDeps' => '0.89';
+recommends 'Module::CoreList' => '2.17';
+recommends 'PAR::Dist' => '0.29';
+recommends 'Archive::Tar' => '1.44';
requires 'ExtUtils::Install' => '1.52';
requires 'ExtUtils::ParseXS' => '2.19';
requires 'Module::Build' => '0.29';
-requires 'LWP::UserAgent' => '5.812';
+recommends 'LWP::UserAgent' => '5.812';
test_requires 'Test::Harness' => '3.13';
test_requires 'Test::More' => '0.86';
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 5fc5b35..6163b00 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -398,7 +398,7 @@ sub author_from {
my $author = $1 || $2;
# XXX: ugly but should work anyway...
- if (eval "require Pod::Escapes; 1") {
+ if (require Pod::Escapes) {
# Pod::Escapes has a mapping table.
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
diff --git a/lib/Module/AutoInstall.pm b/lib/Module/AutoInstall.pm
index 75252c3..1fcd964 100644
--- a/lib/Module/AutoInstall.pm
+++ b/lib/Module/AutoInstall.pm
@@ -90,6 +90,8 @@ sub _init {
$AllDeps = 1;
}
}
+ # ALT: skip autoinstall under rpm
+ $SkipInstall = 1 if $ENV{RPM_ARCH} && $ENV{RPM_OS};
}
# overrides MakeMaker's prompt() to automatically accept the default choice
@@ -185,6 +187,9 @@ sub import {
$arg = 0;
}
+ if ($ENV{RPM_ARCH} && $ENV{RPM_OS} && $feature ne "-core") {
+ print "skip under rpm." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+ }
# XXX: check for conflicts and uninstalls(!) them.
my $cur = _load($mod);
if (_version_cmp ($cur, $arg) >= 0)
@@ -300,7 +305,8 @@ sub _check_lock {
return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS');
}
- require CPAN;
+ eval { require CPAN; };
+ die $@ if $@;
if ($CPAN::VERSION > '1.89') {
if ($cpan_env) {
@@ -409,7 +415,9 @@ sub _install_cpanplus {
my @config = _cpanplus_config( @{ +shift } );
my $installed = 0;
- require CPANPLUS::Backend;
+ eval { require CPANPLUS::Backend; };
+ die $@ if $@;
+
my $cp = CPANPLUS::Backend->new;
my $conf = $cp->configure_object;
@@ -718,7 +726,8 @@ sub _load {
# Load CPAN.pm and it's configuration
sub _load_cpan {
return if $CPAN::VERSION and $CPAN::Config and not @_;
- require CPAN;
+ eval { require CPAN; };
+ die $@ if $@;
# CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to
# CPAN::HandleConfig->load. CPAN reports that the redirection
diff --git a/lib/Module/Install/Admin/Bundle.pm b/lib/Module/Install/Admin/Bundle.pm
index 6187a56..c54f4f7 100644
--- a/lib/Module/Install/Admin/Bundle.pm
+++ b/lib/Module/Install/Admin/Bundle.pm
@@ -2,8 +2,8 @@ package Module::Install::Admin::Bundle;
use strict;
use Module::Install::Base;
-use Module::CoreList;
-use LWP::UserAgent;
+#use Module::CoreList;
+#use LWP::UserAgent;
use vars qw{$VERSION @ISA};
BEGIN {
@@ -16,7 +16,8 @@ sub bundle {
my $bundle_dir = $self->_top->{bundle};
require Cwd;
- require CPANPLUS::Backend;
+ eval { require CPANPLUS::Backend; };
+ die $@ if $@;
my $cwd = Cwd::getcwd();
diff --git a/lib/Module/Install/Admin/Compiler.pm b/lib/Module/Install/Admin/Compiler.pm
index 01148b3..225c196 100644
--- a/lib/Module/Install/Admin/Compiler.pm
+++ b/lib/Module/Install/Admin/Compiler.pm
@@ -2,7 +2,6 @@ package Module::Install::Admin::Compiler;
use strict;
use Module::Install::Base;
-use File::Remove ();
use Devel::PPPort ();
use vars qw{$VERSION @ISA};
@@ -16,7 +15,7 @@ sub ppport {
my $file = shift || 'ppport.h';
if ( -f $file ) {
# Update the file to a newer version
- File::Remove::remove($file);
+ unlink $file or die "cannot remove $file: $!";
}
# Install the file (and remove on realclean)
diff --git a/lib/Module/Install/Admin/Include.pm b/lib/Module/Install/Admin/Include.pm
index 66c0f1b..2d26545 100644
--- a/lib/Module/Install/Admin/Include.pm
+++ b/lib/Module/Install/Admin/Include.pm
@@ -10,6 +10,7 @@ BEGIN {
}
sub include {
+ return if $ENV{RPM_ARCH} && $ENV{RPM_OS};
my $self = shift;
foreach my $rv ( $self->admin->glob_in_inc($_[0]) ) {
$self->admin->copy_package(@$rv);
@@ -139,7 +140,8 @@ its latest version.
=cut
sub _pkg_to_dist {
- require CPAN;
+ eval { require CPAN; };
+ die $@ if $@;
my $mod = CPAN::Shell->expand( Module => $_[1] ) or return;
$mod->cpan_file;
}
diff --git a/lib/Module/Install/Admin/Metadata.pm b/lib/Module/Install/Admin/Metadata.pm
index 8bea64b..ea13a39 100644
--- a/lib/Module/Install/Admin/Metadata.pm
+++ b/lib/Module/Install/Admin/Metadata.pm
@@ -64,20 +64,6 @@ sub dump_meta {
$val->{requires} ||= [];
my $requires = $val->{requires};
- # Issue warnings for unversioned core modules that are
- # already satisfied by the Perl version dependency.
- require Module::CoreList;
- my $corelist = $Module::CoreList::version{$perl_version};
- if ( $corelist ) {
- my @bad = grep { exists $corelist->{$_} }
- map { $_->[0] }
- grep { ! $_->[1] }
- @$requires;
- foreach ( @bad ) {
- # print "WARNING: Unversioned dependency on '$_' is pointless when Perl minimum version is $perl_version\n";
- }
- }
-
# Canonicalize to three-dot version after Perl 5.6
if ( $perl_version >= 5.006 ) {
$perl_version =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e
diff --git a/lib/Module/Install/Admin/ScanDeps.pm b/lib/Module/Install/Admin/ScanDeps.pm
index 3bfa5a2..4ceb1ee 100644
--- a/lib/Module/Install/Admin/ScanDeps.pm
+++ b/lib/Module/Install/Admin/ScanDeps.pm
@@ -9,6 +9,7 @@ BEGIN {
}
sub scan_dependencies {
+ return if $ENV{RPM_ARCH} && $ENV{RPM_OS};
my ($self, $pkg, $perl_version, $pkg_version) = @_;
return if $pkg eq 'perl';
@@ -19,8 +20,11 @@ Please first specify a required perl version, like this:
END_MESSAGE
$perl_version =~ s{^(\d+)\.(\d+)\.(\d+)}{$1 + $2/1_000 + $3/1_000_000}e;
+ eval {
require Module::ScanDeps;
require Module::CoreList;
+ };
+ die $@ if $@;
die "Module::CoreList has no information on perl $perl_version"
unless exists $Module::CoreList::version{$perl_version};
diff --git a/lib/Module/Install/Can.pm b/lib/Module/Install/Can.pm
index ddb36a3..210a0d0 100644
--- a/lib/Module/Install/Can.pm
+++ b/lib/Module/Install/Can.pm
@@ -59,8 +59,11 @@ sub can_cc {
# Fix Cygwin bug on maybe_command();
if ( $^O eq 'cygwin' ) {
+ eval {
require ExtUtils::MM_Cygwin;
require ExtUtils::MM_Win32;
+ };
+ die $@ if $@;
if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
diff --git a/lib/Module/Install/Makefile.pm b/lib/Module/Install/Makefile.pm
index f4ba138..671f37c 100644
--- a/lib/Module/Install/Makefile.pm
+++ b/lib/Module/Install/Makefile.pm
@@ -210,24 +210,6 @@ sub write {
. "but we need version >= $perl_version";
}
- # Make sure we have a new enough MakeMaker
- require ExtUtils::MakeMaker;
-
- if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
- # MakeMaker can complain about module versions that include
- # an underscore, even though its own version may contain one!
- # Hence the funny regexp to get rid of it. See RT #35800
- # for details.
- my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
- $self->build_requires( 'ExtUtils::MakeMaker' => $v );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
- } else {
- # Allow legacy-compatibility with 5.005 by depending on the
- # most recent EU:MM that supported 5.005.
- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
- $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
- }
-
# Generate the MakeMaker params
my $args = $self->makemaker_args;
$args->{DISTNAME} = $self->name;
diff --git a/lib/Module/Install/Metadata.pm b/lib/Module/Install/Metadata.pm
index b83c655..43adbbe 100644
--- a/lib/Module/Install/Metadata.pm
+++ b/lib/Module/Install/Metadata.pm
@@ -397,7 +397,7 @@ sub author_from {
my $author = $1 || $2;
# XXX: ugly but should work anyway...
- if (eval "require Pod::Escapes; 1") {
+ if (require Pod::Escapes) {
# Pod::Escapes has a mapping table.
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
diff --git a/lib/Module/Install/With.pm b/lib/Module/Install/With.pm
index 8f73965..6146a95 100644
--- a/lib/Module/Install/With.pm
+++ b/lib/Module/Install/With.pm
@@ -32,7 +32,6 @@ sub mb {
-
#####################################################################
# Testing and Configuration Contexts
diff --git a/perl-Module-Install.spec b/perl-Module-Install.spec
new file mode 100644
index 0000000..f65872c
--- /dev/null
+++ b/perl-Module-Install.spec
@@ -0,0 +1,80 @@
+%define dist Module-Install
+Name: perl-%dist
+Version: 1.02
+Release: alt1
+
+Summary: Standalone, extensible Perl module installer
+License: GPL or Artistic
+Group: Development/Perl
+
+URL: %CPAN %dist
+Source: %dist-%version.tar
+Patch: %name-%version-%release.patch
+
+BuildArch: noarch
+
+# Automatically added by buildreq on Wed Oct 05 2011
+BuildRequires: perl-File-Remove perl-JSON perl-Module-Build perl-Parse-CPAN-Meta perl-Pod-Escapes
+
+%description
+This module provides a drop-in replacement for ExtUtils::MakeMaker.
+For first-time users, Brian Ingerson's Creating Module Distributions
+with Module::Install in June 2003 issue of The Perl Journal
+http://www.tpj.com/issues/ provides a gentle introduction to how this
+module works.
+
+%prep
+%setup -q -n %dist-%version
+%patch -p1
+rm -r inc/
+
+%build
+%perl_vendor_build
+
+%install
+%perl_vendor_install
+
+%files
+%doc Changes README
+%perl_vendor_privlib/Module
+%perl_vendor_privlib/inc
+
+%changelog
+* Wed Oct 05 2011 Alexey Tourbin <at@altlinux.ru> 1.02-alt1
+- 1.00 -> 1.02
+
+* Sat Dec 18 2010 Alexey Tourbin <at@altlinux.ru> 1.00-alt1
+- 0.95 -> 1.00
+
+* Mon Mar 29 2010 Alexey Tourbin <at@altlinux.ru> 0.95-alt2
+- Metadata.pm: enabled dependency on Pod::Escapes
+
+* Wed Mar 17 2010 Alexey Tourbin <at@altlinux.ru> 0.95-alt1
+- 0.77 -> 0.95
+
+* Wed Nov 05 2008 Alexey Tourbin <at@altlinux.ru> 0.77-alt3
+- Module/Install/Makefile.pm: do not add configure_requires
+ dependency on current ExtUtils::MakeMaker version
+
+* Mon Oct 13 2008 Alexey Tourbin <at@altlinux.ru> 0.77-alt2
+- eliminate dependency on Module::CoreList (again)
+
+* Sat Sep 27 2008 Alexey Tourbin <at@altlinux.ru> 0.77-alt1
+- 0.67 -> 0.77
+
+* Tue Aug 14 2007 Alexey Tourbin <at@altlinux.ru> 0.67-alt1
+- 0.64 -> 0.67
+
+* Wed Oct 25 2006 Alexey Tourbin <at@altlinux.ru> 0.64-alt1
+- 0.36 -> 0.64
+- imported sources into git and build with gear
+- hacked for use with rpm; the following features are disabled
+ when RPM_ARCH and RPM_OS environment variables are set:
+ + skip autoinstall
+ + skip even version check, except for core features
+ + skip includes
+ + skip scan_dependencies
+- hid CPAN and CPANPLUS dependencies with eval blocks
+
+* Sat Sep 10 2005 Alexey Tourbin <at@altlinux.ru> 0.36-alt1
+- initial revision
diff --git a/t/12_eumm_params.t b/t/12_eumm_params.t
index fa0fa8a..c330f0a 100644
--- a/t/12_eumm_params.t
+++ b/t/12_eumm_params.t
@@ -6,7 +6,7 @@ BEGIN {
$^W = 1;
}
-use Test::More tests => 11;
+use Test::More tests => 8;
use File::Spec;
use t::lib::Test;
require ExtUtils::MakeMaker;
@@ -34,15 +34,6 @@ END_DSL
eval ($content);
ok( !$@,'correct content');
ok( exists $PREREQ_PM->{'File::Spec'});
- if ( eval($ExtUtils::MakeMaker::VERSION) < 6.55_03 ) {
- ok( exists $PREREQ_PM->{'ExtUtils::MakeMaker'});
- ok( !exists $BUILD_REQUIRES->{'ExtUtils::MakeMaker'});
- ok (1);
- } else { #best to check both because user can have any version
- ok( exists $BUILD_REQUIRES->{'ExtUtils::MakeMaker'});
- ok( !exists $PREREQ_PM->{'ExtUtils::MakeMaker'});
- is( $MIN_PERL_VERSION, '5.005' , 'correct Perl version');
- }
ok( kill_dist(), 'kill_dist' );
}
diff --git a/t/25_perl_version_from.t b/t/25_perl_version_from.t
index e7b9210..1556d3d 100644
--- a/t/25_perl_version_from.t
+++ b/t/25_perl_version_from.t
@@ -49,6 +49,6 @@ SKIP: {
my $meta = file('META.yml');
ok( -f $meta, 'META.yml exists' );
my $yaml = Parse::CPAN::Meta::LoadFile($meta);
- ok( $yaml->{requires}{perl} eq '5.005', 'META has perl version requirement' );
+ ok( $yaml->{requires}{perl} ge '5.005', 'META has perl version requirement' );
ok( kill_dist(), 'kill_dist' );
}}
diff --git a/t/27_build_requires_and_include.t b/t/27_build_requires_and_include.t
index 80bd944..c0d1ee8 100644
--- a/t/27_build_requires_and_include.t
+++ b/t/27_build_requires_and_include.t
@@ -13,6 +13,9 @@ use t::lib::Test;
plan tests => 14;
+delete $ENV{RPM_ARCH};
+delete $ENV{RPM_OS};
+
SCOPE: { # see if test_requires works correctly
ok( create_dist('Foo', { 'Makefile.PL' => <<"END_DSL" }), 'create_dist' );
use strict;