Lines 38-60
my $deps = $C4::Installer::PerlDependencies::PERL_DEPS;
Link Here
|
38 |
|
38 |
|
39 |
my $prefix = "^/usr/((lib|share)/perl5|(lib|share)/perl/[0-9.]+)"; |
39 |
my $prefix = "^/usr/((lib|share)/perl5|(lib|share)/perl/[0-9.]+)"; |
40 |
|
40 |
|
|
|
41 |
|
41 |
foreach my $module ( keys %$deps ) { |
42 |
foreach my $module ( keys %$deps ) { |
42 |
next if $ignore{$module}; |
43 |
next if $ignore{$module}; |
|
|
44 |
|
43 |
my $ver = $deps->{$module}->{'min_ver'}; |
45 |
my $ver = $deps->{$module}->{'min_ver'}; |
44 |
my $subpath = $module; |
46 |
my $subpath = $module; |
45 |
$subpath =~ s,::,/,g; |
47 |
$subpath =~ s,::,/,g; |
46 |
my $output = qx(apt-file -l -x search "$prefix/$subpath.pm\$"); |
48 |
my $output = qx(apt-file -l -x search "$prefix/$subpath.pm\$"); |
|
|
49 |
|
47 |
my @temp = split( /\n/, $output ); |
50 |
my @temp = split( /\n/, $output ); |
48 |
my @lines = (); |
51 |
my @lines = (); |
49 |
|
52 |
|
50 |
# Remove packages that are required/essential and always installed on |
53 |
# Remove packages that are required/essential and always installed on |
51 |
# a Debian system. Debian packages should not have unversioned |
54 |
# a Debian system. Debian packages should not have unversioned |
52 |
# dependencies on such packages. |
55 |
# dependencies on such packages. |
53 |
foreach my $line (@temp) { |
56 |
|
54 |
if ( $line ne "perl-base" ) { |
57 |
#skip if module if its already satisfied by a base perl module |
|
|
58 |
my @skip = grep( /^perl-base$|^perl-modules$|^perl$/, @temp); |
59 |
next if scalar @skip > 0 ; |
60 |
|
61 |
# or else, add that module |
62 |
my @temp2 = grep( !/^perl-base$|^perl-modules$|^perl$/, @temp); |
63 |
foreach my $line (@temp2) { |
55 |
@lines = ( @lines, $line ); |
64 |
@lines = ( @lines, $line ); |
56 |
} |
|
|
57 |
} |
65 |
} |
|
|
66 |
|
58 |
if ( scalar(@lines) == 1 && $lines[0] ne "" ) { |
67 |
if ( scalar(@lines) == 1 && $lines[0] ne "" ) { |
59 |
my $pkg = $lines[0]; |
68 |
my $pkg = $lines[0]; |
60 |
print "$pkg\n"; |
69 |
print "$pkg\n"; |
61 |
- |
|
|