|
@ -107,12 +107,16 @@ sub db { |
|
|
elsif (/^Status:/) { |
|
|
elsif (/^Status:/) { |
|
|
chomp; |
|
|
chomp; |
|
|
$status = substr($_,8); |
|
|
$status = substr($_,8); |
|
|
# a test |
|
|
# a test and now a solution |
|
|
#if ($status eq "purge ok not-installed") { |
|
|
if ($status eq "purge ok not-installed") { |
|
|
# if (defined $db{$package[1]}) { |
|
|
########## |
|
|
# print "$db{$package[1]}\n"; |
|
|
# PURGED # |
|
|
# } |
|
|
########## |
|
|
#} |
|
|
if (defined $db{$package[1]}) { |
|
|
|
|
|
#push(@gone,"$db{$package[1]}"); |
|
|
|
|
|
print "$db{$package[1]}\n"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
# hold ok not-installed - may want to change this just to |
|
|
# hold ok not-installed - may want to change this just to |
|
|
# non-installed. |
|
|
# non-installed. |
|
@ -221,6 +225,7 @@ sub db { |
|
|
untie %ib; |
|
|
untie %ib; |
|
|
undef %ib; |
|
|
undef %ib; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Going to be adding some stuff to nsearchindex.deb and ndirindex.deb |
|
|
# Going to be adding some stuff to nsearchindex.deb and ndirindex.deb |
|
|
# so better remove any compressed versions if they exist |
|
|
# so better remove any compressed versions if they exist |
|
|
if (@GONE || @NEW) { |
|
|
if (@GONE || @NEW) { |
|
@ -329,8 +334,8 @@ sub db { |
|
|
# files for *.list are in ./info/backup/*.list.bk. We will also have to |
|
|
# files for *.list are in ./info/backup/*.list.bk. We will also have to |
|
|
# deal with those rare cases that forget /. (smail 2.0v). We should remove |
|
|
# deal with those rare cases that forget /. (smail 2.0v). We should remove |
|
|
# this file as well as the packagename-conf.md5sums file below. |
|
|
# this file as well as the packagename-conf.md5sums file below. |
|
|
my $file = "$parent$base/info/backup/$_.list.bk"; |
|
|
my $file = "$main::home$parent$base/info/backup/$_.list.bk"; |
|
|
my $md5sum_file = "$parent$base/info/$_-conf.md5sums"; |
|
|
my $md5sum_file = "$main::home$parent$base/info/$_-conf.md5sums"; |
|
|
open(LIST,"$file"); |
|
|
open(LIST,"$file"); |
|
|
while (<LIST>) { |
|
|
while (<LIST>) { |
|
|
chomp; |
|
|
chomp; |
|
@ -797,21 +802,23 @@ sub db { |
|
|
# made, might as well use this. There is a possibility this can be |
|
|
# made, might as well use this. There is a possibility this can be |
|
|
# used instead of fastswim for initial fileindex.deb. |
|
|
# used instead of fastswim for initial fileindex.deb. |
|
|
my $package_name; |
|
|
my $package_name; |
|
|
if (!-d "$parent$base/info/backup") { |
|
|
if (!-d "$main::home$parent$base/info/backup") { |
|
|
mkdir("$parent$base/info/backup",0666); |
|
|
mkdir("$main::home$parent$base/info/backup",0666); |
|
|
} |
|
|
} |
|
|
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,"$parent$base/info/$package_name.list"); |
|
|
open(FILENAME,"$main::home$parent$base/info/$package_name.list"); |
|
|
open(CP,">$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" ) { |
|
|
while (<FILENAME>) { |
|
|
while (<FILENAME>) { |
|
|
print CP $_; |
|
|
print CP $_; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
close(FILENAME); |
|
|
close(FILENAME); |
|
|
close(CP); |
|
|
close(CP); |
|
|
|
|
|
|
|
|
my $file = "$parent$base/info/backup/$package_name.list.bk"; |
|
|
my $file = "$main::home$parent$base/info/backup/$package_name.list.bk"; |
|
|
print STDERR "#$x"; print STDERR " N|C $package_name.list \r"; |
|
|
print STDERR "#$x"; print STDERR " N|C $package_name.list \r"; |
|
|
$x++; |
|
|
$x++; |
|
|
open(LIST,"$file"); |
|
|
open(LIST,"$file"); |
|
|