Skip to content

Commit

Permalink
Added option to disable APT and YUM module installs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Apr 27, 2007
1 parent 7b05ce8 commit 7b05766
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cpan/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ Perl modules that try to auto-install depencies from CPAN no longer hang during
Fixed a bug that prevented a custom temp files directory from being used when installing Perl modules.
---- Changes since 1.330 ----
When installing a Perl module from CPAN and it already exists in an operating system package (such as from APT or YUM), use that instead.
---- Changes since 1.340 ----
Added Module Config option to not install modules from APT or YUM.
1 change: 1 addition & 0 deletions cpan/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cpan=http://www.cpan.org/authors/id
refresh_days=30
save_partial=0
incpackages=1
incyum=1
1 change: 1 addition & 0 deletions cpan/config-solaris
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ refresh_days=30
save_partial=0
def_args='OPTIMIZE= ' 'CCFLAGS= ' 'CCCDLFLAGS= '
incpackages=1
incyum=1
1 change: 1 addition & 0 deletions cpan/config.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ refresh_days=Days before refreshing CPAN module list,0,5
save_partial=Keep downloaded module if install fails?,1,1-Yes,0-No
def_args=Default arguments to Makefile.PL,0
incpackages=Include Perl modules from software packages?,1,1-Yes,0-No
incyum=Install Perl modules from YUM or APT where available?,1,1-Yes,0-No
line2=System configuration,11
packages=CPAN perl modules list,0
cpan=CPAN modules base URL,0
10 changes: 6 additions & 4 deletions cpan/download.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ elsif ($in{'source'} == 3) {
@cpan = split(/\s+|\0/, $in{'cpan'});

# First check if YUM or APT can install this module for us
@yum = &list_packaged_modules();
foreach $c (@cpan) {
($yum) = grep { lc($_->{'mod'}) eq lc($c) } @yum;
push(@cpanyum, $yum) if ($yum);
if ($config{'incyum'}) {
@yum = &list_packaged_modules();
foreach $c (@cpan) {
($yum) = grep { lc($_->{'mod'}) eq lc($c) } @yum;
push(@cpanyum, $yum) if ($yum);
}
}
if (scalar(@cpan) == scalar(@cpanyum)) {
# Can install from YUM or APT .. do it!
Expand Down

0 comments on commit 7b05766

Please sign in to comment.