|
|
@ -71,6 +71,7 @@ sub db { |
|
|
|
my (@GONE, @CHANGED, @NEW); |
|
|
|
my @before; |
|
|
|
my %compare; |
|
|
|
my %purge_count; |
|
|
|
|
|
|
|
# The mys for NEW |
|
|
|
my $count = 0; |
|
|
@ -112,10 +113,21 @@ sub db { |
|
|
|
########## |
|
|
|
# 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]}) { |
|
|
|
#print "$db{$package[1]}\n"; |
|
|
|
$db{$package[1]} =~ m,(^.*)_.*$,; |
|
|
|
push(@GONE,$1); |
|
|
|
#$db{$package[1]} =~ m,(^.*)_.*$,; |
|
|
|
#$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) { |
|
|
|
$exacts{$_} = "yes"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# first let's find the fields to put into packages.deb |
|
|
|
# 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 |
|
|
@ -809,9 +823,9 @@ sub db { |
|
|
|
print STDERR "\n" if $#NEW != -1; $x = 1; |
|
|
|
|
|
|
|
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"); |
|
|
|
if ( -e "$main::home$parent$base/info/$package_name.list" ) { |
|
|
|
if ( -e "$parent$base/info/$package_name.list" ) { |
|
|
|
while (<FILENAME>) { |
|
|
|
print CP $_; |
|
|
|
} |
|
|
@ -862,11 +876,16 @@ sub db { |
|
|
|
} # if defined |
|
|
|
else { |
|
|
|
dbi(\%commands); |
|
|
|
print "$_ $db{$package_name}\n"; |
|
|
|
$zing->put($_,$db{$package_name}); |
|
|
|
} |
|
|
|
|
|
|
|
untie %db; |
|
|
|
untie $zing; |
|
|
|
} |
|
|
|
|
|
|
|
} # end while |
|
|
|
|
|
|
|
|
|
|
|
close(LIST); |
|
|
|
close(SEARCHINDEX); |
|
|
|
close(DIRINDEX); |
|
|
|