|
@ -71,6 +71,7 @@ sub db { |
|
|
my (@GONE, @CHANGED, @NEW); |
|
|
my (@GONE, @CHANGED, @NEW); |
|
|
my @before; |
|
|
my @before; |
|
|
my %compare; |
|
|
my %compare; |
|
|
|
|
|
my %purge_count; |
|
|
|
|
|
|
|
|
# The mys for NEW |
|
|
# The mys for NEW |
|
|
my $count = 0; |
|
|
my $count = 0; |
|
@ -112,10 +113,21 @@ sub db { |
|
|
########## |
|
|
########## |
|
|
# PURGED # |
|
|
# PURGED # |
|
|
########## |
|
|
########## |
|
|
|
|
|
# actually this works correctly if the db was pre-made |
|
|
|
|
|
# because $rootsky was being appende, so the same thing will |
|
|
|
|
|
# be done for --db now :) |
|
|
if (defined $db{$package[1]}) { |
|
|
if (defined $db{$package[1]}) { |
|
|
#print "$db{$package[1]}\n"; |
|
|
#print "$db{$package[1]}\n"; |
|
|
$db{$package[1]} =~ m,(^.*)_.*$,; |
|
|
#$db{$package[1]} =~ m,(^.*)_.*$,; |
|
|
push(@GONE,$1); |
|
|
#$purge_count{$1}++; |
|
|
|
|
|
# print "HI $1 $purge_count{$1}\n"; |
|
|
|
|
|
#my $it = grep(/$1/,@GONE); |
|
|
|
|
|
#print "HELLO $it\n"; |
|
|
|
|
|
#if ($purge_count{$1} == 1 ) { |
|
|
|
|
|
#if ( !grep(/$1/,@GONE) ) { |
|
|
|
|
|
# push(@GONE,$1); |
|
|
|
|
|
#} |
|
|
|
|
|
#} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -425,6 +437,8 @@ sub db { |
|
|
foreach (@NEW) { |
|
|
foreach (@NEW) { |
|
|
$exacts{$_} = "yes"; |
|
|
$exacts{$_} = "yes"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# first let's find the fields to put into packages.deb |
|
|
# first let's find the fields to put into packages.deb |
|
|
# We'll have to go through the status file again, something we |
|
|
# We'll have to go through the status file again, something we |
|
|
# wouldn't have had to do with swim -i. As it turns out, a good |
|
|
# wouldn't have had to do with swim -i. As it turns out, a good |
|
@ -809,9 +823,9 @@ sub db { |
|
|
print STDERR "\n" if $#NEW != -1; $x = 1; |
|
|
print STDERR "\n" if $#NEW != -1; $x = 1; |
|
|
|
|
|
|
|
|
foreach $package_name (@NEW) { |
|
|
foreach $package_name (@NEW) { |
|
|
open(FILENAME,"$main::home$parent$base/info/$package_name.list"); |
|
|
open(FILENAME,"$parent$base/info/$package_name.list"); |
|
|
open(CP,">$main::home$parent$base/info/backup/$package_name.list.bk"); |
|
|
open(CP,">$main::home$parent$base/info/backup/$package_name.list.bk"); |
|
|
if ( -e "$main::home$parent$base/info/$package_name.list" ) { |
|
|
if ( -e "$parent$base/info/$package_name.list" ) { |
|
|
while (<FILENAME>) { |
|
|
while (<FILENAME>) { |
|
|
print CP $_; |
|
|
print CP $_; |
|
|
} |
|
|
} |
|
@ -862,11 +876,16 @@ sub db { |
|
|
} # if defined |
|
|
} # if defined |
|
|
else { |
|
|
else { |
|
|
dbi(\%commands); |
|
|
dbi(\%commands); |
|
|
|
|
|
print "$_ $db{$package_name}\n"; |
|
|
$zing->put($_,$db{$package_name}); |
|
|
$zing->put($_,$db{$package_name}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
untie %db; |
|
|
untie %db; |
|
|
untie $zing; |
|
|
untie $zing; |
|
|
} |
|
|
|
|
|
|
|
|
} # end while |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
close(LIST); |
|
|
close(LIST); |
|
|
close(SEARCHINDEX); |
|
|
close(SEARCHINDEX); |
|
|
close(DIRINDEX); |
|
|
close(DIRINDEX); |
|
|