mirror of
https://github.com/fspc/dswim.git
synced 2025-02-22 08:33:24 -05:00
Now things should be debconf happy, at least --initdb and --rebuilddb.
This commit is contained in:
parent
a3fea33120
commit
110589ac75
22
SWIM/MD.pm
22
SWIM/MD.pm
@ -40,7 +40,7 @@ multi-dimensional is the way to go.
|
|||||||
|
|
||||||
sub process_md {
|
sub process_md {
|
||||||
|
|
||||||
print "File Database is being made\n";
|
print STDERR "File Database is being made\n";
|
||||||
|
|
||||||
my ($commands) = @_;
|
my ($commands) = @_;
|
||||||
my %commands = %$commands;
|
my %commands = %$commands;
|
||||||
@ -86,7 +86,7 @@ sub process_md {
|
|||||||
@ppackage = <$tmp/DEBIAN*>;
|
@ppackage = <$tmp/DEBIAN*>;
|
||||||
# It's unlikely this file will ever get too massive.
|
# It's unlikely this file will ever get too massive.
|
||||||
push(@ppackage, "$tmp/long.debian");
|
push(@ppackage, "$tmp/long.debian");
|
||||||
print " Create the database\n";
|
print STDERR " Create the database\n";
|
||||||
foreach $thingy (@ppackage) {
|
foreach $thingy (@ppackage) {
|
||||||
open(PARTS, "$thingy");
|
open(PARTS, "$thingy");
|
||||||
while (<PARTS>) {
|
while (<PARTS>) {
|
||||||
@ -100,8 +100,8 @@ sub process_md {
|
|||||||
push(@mi,$md[0]);
|
push(@mi,$md[0]);
|
||||||
push(@mi,$md[1]);
|
push(@mi,$md[1]);
|
||||||
} # while
|
} # while
|
||||||
print " $thingy\n";
|
print STDERR " $thingy\n";
|
||||||
print " wait a few seconds\n";
|
print STDERR " wait a few seconds\n";
|
||||||
my $zing;
|
my $zing;
|
||||||
if (($commands->{"dbpath"} && $commands->{"root"}) ||
|
if (($commands->{"dbpath"} && $commands->{"root"}) ||
|
||||||
($commands->{"dbpath"} && !$commands->{"root"}) ||
|
($commands->{"dbpath"} && !$commands->{"root"}) ||
|
||||||
@ -155,7 +155,7 @@ sub process_md {
|
|||||||
# creates the hash database reference for -db or -i.
|
# creates the hash database reference for -db or -i.
|
||||||
my $searchindex = $not . "searchindex";
|
my $searchindex = $not . "searchindex";
|
||||||
open(FLATFILE, ">$place/$searchindex$arch$dist.deb");
|
open(FLATFILE, ">$place/$searchindex$arch$dist.deb");
|
||||||
print "Create the powersearch flat database\n";
|
print STDERR "Create the powersearch flat database\n";
|
||||||
foreach $thingy (@ppackage) {
|
foreach $thingy (@ppackage) {
|
||||||
if ($thingy ne "$tmp/long.debian") {
|
if ($thingy ne "$tmp/long.debian") {
|
||||||
open(PARTS, "$thingy");
|
open(PARTS, "$thingy");
|
||||||
@ -167,8 +167,8 @@ sub process_md {
|
|||||||
push(@mi,$md[0]);
|
push(@mi,$md[0]);
|
||||||
} # while
|
} # while
|
||||||
}
|
}
|
||||||
print " $thingy\n";
|
print STDERR " $thingy\n";
|
||||||
print " wait a few seconds\n";
|
print STDERR " wait a few seconds\n";
|
||||||
while ($count <= $#mi) {
|
while ($count <= $#mi) {
|
||||||
print FLATFILE "$mi[$count]\n";
|
print FLATFILE "$mi[$count]\n";
|
||||||
$count++;
|
$count++;
|
||||||
@ -188,7 +188,7 @@ sub process_md {
|
|||||||
# package without directories or files, but this is Debian.
|
# package without directories or files, but this is Debian.
|
||||||
my $dirindex = $not . "dirindex";
|
my $dirindex = $not . "dirindex";
|
||||||
open(FLATFILE, ">$place/$dirindex$arch$dist.deb");
|
open(FLATFILE, ">$place/$dirindex$arch$dist.deb");
|
||||||
print "Create the powersearch flat directory database\n";
|
print STDERR "Create the powersearch flat directory database\n";
|
||||||
open(PARTS, "$ppackage[$#ppackage]");
|
open(PARTS, "$ppackage[$#ppackage]");
|
||||||
while (<PARTS>) {
|
while (<PARTS>) {
|
||||||
@md = split(/ -> /,$_);
|
@md = split(/ -> /,$_);
|
||||||
@ -197,7 +197,7 @@ sub process_md {
|
|||||||
}
|
}
|
||||||
push(@mi,$md[0]);
|
push(@mi,$md[0]);
|
||||||
} # while
|
} # while
|
||||||
print " $ppackage[$#ppackage]\n";
|
print STDERR " $ppackage[$#ppackage]\n";
|
||||||
while ($count <= $#mi) {
|
while ($count <= $#mi) {
|
||||||
print FLATFILE "$mi[$count]\n";
|
print FLATFILE "$mi[$count]\n";
|
||||||
$count++;
|
$count++;
|
||||||
@ -261,8 +261,8 @@ sub process_md {
|
|||||||
|
|
||||||
|
|
||||||
#!!!
|
#!!!
|
||||||
print " over and out\n";
|
print STDERR " over and out\n";
|
||||||
print scalar(localtime), "\n";
|
print STDERR scalar(localtime), "\n";
|
||||||
|
|
||||||
} # end sub process_md
|
} # end sub process_md
|
||||||
|
|
||||||
|
@ -153,8 +153,8 @@ my %version;
|
|||||||
open(LONG, ">$ARGV[2]/long.debian") or die;
|
open(LONG, ">$ARGV[2]/long.debian") or die;
|
||||||
foreach $thingy (sort keys %HL ) {
|
foreach $thingy (sort keys %HL ) {
|
||||||
$x = 1 if $x == 6;
|
$x = 1 if $x == 6;
|
||||||
print STDERR "|\r" if $x == 1 || $x == 4; print "/\r" if $x == 2;
|
print STDERR "|\r" if $x == 1 || $x == 4; print STDERR "/\r" if $x == 2;
|
||||||
print STDERR "-\r" if $x == 3 || $x == 6; print "\\\r" if $x == 5;
|
print STDERR "-\r" if $x == 3 || $x == 6; print STDERR "\\\r" if $x == 5;
|
||||||
$x++;
|
$x++;
|
||||||
# Humm, will split or grep be faster?
|
# Humm, will split or grep be faster?
|
||||||
#my $tingy = "@{ $HL{$thingy} }" . " " . @{ $HL{$thingy} };
|
#my $tingy = "@{ $HL{$thingy} }" . " " . @{ $HL{$thingy} };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user