|
@ -265,14 +265,21 @@ return $stuff; |
|
|
# to test for anyways, weirder things have been known to happen. |
|
|
# to test for anyways, weirder things have been known to happen. |
|
|
|
|
|
|
|
|
my @rpc; |
|
|
my @rpc; |
|
|
foreach my $p (@required_packages) { |
|
|
$/ = ""; |
|
|
|
|
|
my @required_stuff = `swim -qi @required_packages`; |
|
|
|
|
|
$/ = "\n"; |
|
|
|
|
|
foreach my $package_info (@required_stuff) { |
|
|
|
|
|
$package_info =~ /^package[:]*\s+([-\+\d\w]+)/i; |
|
|
|
|
|
my $p = $1; |
|
|
$p =~ s/\+/\\+/g if $p !~ /\\+/g; |
|
|
$p =~ s/\+/\\+/g if $p !~ /\\+/g; |
|
|
if ( grep(/Status: deinstall|Status: purge|package $p is not installed/, |
|
|
if ( grep(/Status: deinstall|Status: purge|package $p is not installed/, |
|
|
`swim -qi $p`) == 1 ) { |
|
|
$package_info ) == 1 ) { |
|
|
|
|
|
$p =~ s/\\//g if $p =~ /\\+/g; |
|
|
push( @rpc, $p ); |
|
|
push( @rpc, $p ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (@rpc) { |
|
|
if (@rpc) { |
|
|
print STDERR "These are the required packages which were specified:\n\n"; |
|
|
print STDERR "These are the required packages which were specified:\n\n"; |
|
|
$, = " "; |
|
|
$, = " "; |
|
@ -282,11 +289,18 @@ if (@rpc) { |
|
|
$, = ""; |
|
|
$, = ""; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
my @epc; |
|
|
my @epc; |
|
|
foreach my $p (@extra_packages) { |
|
|
$/ = ""; |
|
|
|
|
|
my @extra_stuff = `swim -qi @extra_packages`; |
|
|
|
|
|
$/ = "\n"; |
|
|
|
|
|
foreach my $package_info (@extra_stuff) { |
|
|
|
|
|
$package_info =~ /^package[:]*\s+([-\+\d\w]+)/i; |
|
|
|
|
|
my $p = $1; |
|
|
$p =~ s/\+/\\+/g if $p !~ /\\+/g; |
|
|
$p =~ s/\+/\\+/g if $p !~ /\\+/g; |
|
|
if ( grep(/Status: deinstall|Status: purge|package $p is not installed/, |
|
|
if ( grep(/Status: deinstall|Status: purge|package $p is not installed/, |
|
|
`swim -qi $p`) == 1 ) { |
|
|
$package_info ) == 1 ) { |
|
|
|
|
|
$p =~ s/\\//g if $p =~ /\\+/g; |
|
|
push( @epc, $p ); |
|
|
push( @epc, $p ); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|