Browse Source

Much more efficient code with the newest dswim.

master
freesource 23 years ago
parent
commit
59c77e7e23
  1. 20
      add-ons/yard/make-debian-X11/make_debian-X11
  2. 22
      yard/scripts/make_debian

20
add-ons/yard/make-debian-X11/make_debian-X11

@ -292,10 +292,16 @@ return $stuff;
# to test for anyways, weirder things have been known to happen.
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;
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 );
}
}
@ -310,10 +316,16 @@ if (@rpc) {
}
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;
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 );
}
}

22
yard/scripts/make_debian

@ -265,14 +265,21 @@ return $stuff;
# to test for anyways, weirder things have been known to happen.
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;
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 );
}
}
if (@rpc) {
print STDERR "These are the required packages which were specified:\n\n";
$, = " ";
@ -282,11 +289,18 @@ if (@rpc) {
$, = "";
}
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;
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 );
}
}

Loading…
Cancel
Save