Browse Source

Much more efficient code with the newest dswim.

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

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

@ -292,11 +292,17 @@ 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 ) {
push(@rpc,$p);
$package_info ) == 1 ) {
$p =~ s/\\//g if $p =~ /\\+/g;
push( @rpc, $p );
}
}
@ -310,11 +316,17 @@ 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 ) {
push(@epc,$p);
$package_info ) == 1 ) {
$p =~ s/\\//g if $p =~ /\\+/g;
push( @epc, $p );
}
}

26
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 ) {
push(@rpc,$p);
$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,12 +289,19 @@ 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 ) {
push(@epc,$p);
$package_info ) == 1 ) {
$p =~ s/\\//g if $p =~ /\\+/g;
push( @epc, $p );
}
}

Loading…
Cancel
Save