mirror of
https://github.com/fspc/dswim.git
synced 2025-02-22 08:33:24 -05:00
Making debconf happy.
This commit is contained in:
parent
35c8a84f05
commit
d59c384d16
20
bin/fastswim
20
bin/fastswim
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
#use diagnostics;
|
|
||||||
require 5.004;
|
require 5.004;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ use strict;
|
|||||||
#
|
#
|
||||||
# Package administration and research tool for Debian
|
# Package administration and research tool for Debian
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2000 Jonathan D. Rosenbaum
|
# Copyright (C) 1999-2001 Jonathan D. Rosenbaum
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -56,7 +56,7 @@ my $home = $ENV{'HOME'} . "/";
|
|||||||
# This way has been de-pre-c-whatever-ated because it lacks version
|
# This way has been de-pre-c-whatever-ated because it lacks version
|
||||||
# rememberance, and is just kept for testing purposes
|
# rememberance, and is just kept for testing purposes
|
||||||
if ($#ARGV == -1) {
|
if ($#ARGV == -1) {
|
||||||
print "swim: fastswim requires option/arguments, see program for instructions\n";
|
print STDERR "swim: fastswim requires option/arguments, see program for instructions\n";
|
||||||
exit;
|
exit;
|
||||||
chdir("$ARGV[1]");
|
chdir("$ARGV[1]");
|
||||||
#consider readdir
|
#consider readdir
|
||||||
@ -91,7 +91,7 @@ my $home = $ENV{'HOME'} . "/";
|
|||||||
# Better check for packages which don't have /. in their *.list...
|
# Better check for packages which don't have /. in their *.list...
|
||||||
# which is rare, but does happen. Sometimes *.list(s) don't have
|
# which is rare, but does happen. Sometimes *.list(s) don't have
|
||||||
# all the parent directories, but we won't worry about that.
|
# all the parent directories, but we won't worry about that.
|
||||||
print " Making the massive hash\n";
|
print STDERR " Making the massive hash\n";
|
||||||
$| = 1; my $x = 1;
|
$| = 1; my $x = 1;
|
||||||
foreach $thingy (sort @ppackage) {
|
foreach $thingy (sort @ppackage) {
|
||||||
open(LIST, "$ARGV[1]/$thingy") or die "Humm, strange";
|
open(LIST, "$ARGV[1]/$thingy") or die "Humm, strange";
|
||||||
@ -102,8 +102,8 @@ my $home = $ENV{'HOME'} . "/";
|
|||||||
close(LIST);
|
close(LIST);
|
||||||
foreach (@count) {
|
foreach (@count) {
|
||||||
$x = 1 if $x == 6;
|
$x = 1 if $x == 6;
|
||||||
print "|\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 "-\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++;
|
||||||
chomp $_;
|
chomp $_;
|
||||||
# does /. exist? it should be first.
|
# does /. exist? it should be first.
|
||||||
@ -147,14 +147,14 @@ my $home = $ENV{'HOME'} . "/";
|
|||||||
# We will create one file with the 1..and another with >1..
|
# We will create one file with the 1..and another with >1..
|
||||||
# than split..reverse..and order.accordingly..this makes
|
# than split..reverse..and order.accordingly..this makes
|
||||||
# things much faster. Remember clean-up routines for kill.
|
# things much faster. Remember clean-up routines for kill.
|
||||||
print " Starting ... writing to $ARGV[2]!\n";
|
print STDERR " Starting ... writing to $ARGV[2]!\n";
|
||||||
# Create the database
|
# Create the database
|
||||||
open(BIG, ">$ARGV[2]/big.debian") or die;
|
open(BIG, ">$ARGV[2]/big.debian") or die;
|
||||||
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 "|\r" if $x == 1 || $x == 4; print "/\r" if $x == 2;
|
print STDERR "|\r" if $x == 1 || $x == 4; print "/\r" if $x == 2;
|
||||||
print "-\r" if $x == 3 || $x == 6; print "\\\r" if $x == 5;
|
print STDERR "-\r" if $x == 3 || $x == 6; print "\\\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} };
|
||||||
@ -170,6 +170,6 @@ my $home = $ENV{'HOME'} . "/";
|
|||||||
close(BIG);
|
close(BIG);
|
||||||
close(LONG);
|
close(LONG);
|
||||||
#undef %HL;
|
#undef %HL;
|
||||||
print " Cleaning up\n";
|
print STDERR " Cleaning up\n";
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
@ -7,7 +7,7 @@ use strict;
|
|||||||
#
|
#
|
||||||
# Package administration and research tool for Debian
|
# Package administration and research tool for Debian
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999-2000 Jonathan D. Rosenbaum
|
# Copyright (C) 1999-2001 Jonathan D. Rosenbaum
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -51,7 +51,7 @@ line.
|
|||||||
my $home = $ENV{'HOME'} . "/";
|
my $home = $ENV{'HOME'} . "/";
|
||||||
|
|
||||||
if ($#ARGV == -1) {
|
if ($#ARGV == -1) {
|
||||||
print "swim: imswim requires arguments, see program for instructions\n";
|
print STDERR "swim: imswim requires arguments, see program for instructions\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -71,8 +71,8 @@ line.
|
|||||||
close(LIST);
|
close(LIST);
|
||||||
foreach (@count) {
|
foreach (@count) {
|
||||||
$x = 1 if $x == 6;
|
$x = 1 if $x == 6;
|
||||||
print "|\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 "-\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++;
|
||||||
chomp $_;
|
chomp $_;
|
||||||
# does /. exist? it should be first.
|
# does /. exist? it should be first.
|
||||||
|
56
bin/longswim
56
bin/longswim
@ -1,27 +1,33 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
#use diagnostics;
|
|
||||||
use strict;
|
use strict;
|
||||||
use DB_File;
|
use DB_File;
|
||||||
|
|
||||||
################################################################################
|
############################################################################
|
||||||
# Package administration and research tool for Debian #
|
#
|
||||||
# Copyright (C) 1999-2000 Jonathan D. Rosenbaum #
|
# Package administration and research tool for Debian
|
||||||
# #
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify #
|
# Copyright (C) 1999-2001 Jonathan D. Rosenbaum
|
||||||
# it under the terms of the GNU General Public License as published by #
|
#
|
||||||
# the Free Software Foundation; either version 2 of the License, or #
|
#
|
||||||
# (at your option) any later version. #
|
#
|
||||||
# #
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# This program is distributed in the hope that it will be useful, #
|
#
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
# it under the terms of the GNU General Public License as published by
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# GNU General Public License for more details. #
|
# (at your option) any later version.
|
||||||
# #
|
#
|
||||||
# You should have received a copy of the GNU General Public License #
|
# This program is distributed in the hope that it will be useful,
|
||||||
# along with this program; if not, write to the Free Software #
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.#
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
################################################################################
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
@ -44,7 +50,7 @@ SWIM::NDB_Init.
|
|||||||
|
|
||||||
|
|
||||||
if ($#ARGV == -1) {
|
if ($#ARGV == -1) {
|
||||||
print "swim: longswim requires many arguments, see program for instructions\n";
|
print STDERR "swim: longswim requires many arguments, see program for instructions\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,8 +103,8 @@ sub nmd {
|
|||||||
s,^(\./)+,,; # filter for Debians altered dir structure
|
s,^(\./)+,,; # filter for Debians altered dir structure
|
||||||
print CONTENTSDB $_;
|
print CONTENTSDB $_;
|
||||||
$x = 1 if $x == 6;
|
$x = 1 if $x == 6;
|
||||||
print "|\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 "-\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++;
|
||||||
chomp $_;
|
chomp $_;
|
||||||
# find all directories
|
# find all directories
|
||||||
@ -448,14 +454,14 @@ sub nmd {
|
|||||||
close(FILEDIR);
|
close(FILEDIR);
|
||||||
close(CONTENTS);
|
close(CONTENTS);
|
||||||
|
|
||||||
print "Compress contents\n";
|
print STDERR "Compress contents\n";
|
||||||
system "$gzip", "-9", "$contentsindex";
|
system "$gzip", "-9", "$contentsindex";
|
||||||
utime(time,$Contents_mtime,$contentsindex);
|
utime(time,$Contents_mtime,$contentsindex);
|
||||||
print "Cleaning up\n";
|
print STDERR "Cleaning up\n";
|
||||||
# this will add a newline, but better to do a Ctrl-C than to have the
|
# this will add a newline, but better to do a Ctrl-C than to have the
|
||||||
# process hang and respawn itself - something which sometimes happens
|
# process hang and respawn itself - something which sometimes happens
|
||||||
kill INT => $$;
|
kill INT => $$;
|
||||||
print "swim: please press Ctrl-c\n"; # just in case :)
|
print STDERR "swim: please press Ctrl-c\n"; # just in case :)
|
||||||
|
|
||||||
# probably don't need to do this ends the program
|
# probably don't need to do this ends the program
|
||||||
#undef %all;
|
#undef %all;
|
||||||
|
56
bin/slowswim
56
bin/slowswim
@ -1,28 +1,32 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
#use diagnostics;
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
################################################################################
|
############################################################################
|
||||||
# Package administration and research tool for Debian #
|
#
|
||||||
# Copyright (C) 1999-2000 Jonathan D. Rosenbaum #
|
# Package administration and research tool for Debian
|
||||||
# #
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify #
|
# Copyright (C) 1999-2001 Jonathan D. Rosenbaum
|
||||||
# it under the terms of the GNU General Public License as published by #
|
#
|
||||||
# the Free Software Foundation; either version 2 of the License, or #
|
#
|
||||||
# (at your option) any later version. #
|
#
|
||||||
# #
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# This program is distributed in the hope that it will be useful, #
|
#
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
# it under the terms of the GNU General Public License as published by
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# GNU General Public License for more details. #
|
# (at your option) any later version.
|
||||||
# #
|
#
|
||||||
# You should have received a copy of the GNU General Public License #
|
# This program is distributed in the hope that it will be useful,
|
||||||
# along with this program; if not, write to the Free Software #
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.#
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
################################################################################
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
This program only takes two argument, a temp directory and the name of the
|
This program only takes two argument, a temp directory and the name of the
|
||||||
@ -32,7 +36,7 @@ binary sort..sort. You can test a filedir.deb file.
|
|||||||
=cut
|
=cut
|
||||||
|
|
||||||
if ($#ARGV == -1) {
|
if ($#ARGV == -1) {
|
||||||
print "swim: slowswim requires arguments, see program for instructions\n";
|
print STDERR "swim: slowswim requires arguments, see program for instructions\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,18 +55,18 @@ sub pre_md {
|
|||||||
my $fcount = 0;
|
my $fcount = 0;
|
||||||
my @tempholder;
|
my @tempholder;
|
||||||
|
|
||||||
print "Sorting everything\n";
|
print STDERR "Sorting everything\n";
|
||||||
system ("$sort $tmp/filedir.deb > $tmp/sortfiledir.deb");
|
system ("$sort $tmp/filedir.deb > $tmp/sortfiledir.deb");
|
||||||
unlink("$tmp/filedir.deb");
|
unlink("$tmp/filedir.deb");
|
||||||
|
|
||||||
# grab the keys from the sorted file
|
# grab the keys from the sorted file
|
||||||
print "Making the massive hash using lowmem\n";
|
print STDERR "Making the massive hash using lowmem\n";
|
||||||
$| = 1; my $x = 1;
|
$| = 1; my $x = 1;
|
||||||
open(FILEDIR, "$tmp/sortfiledir.deb") or die "where is sortfiledir.deb?\n";
|
open(FILEDIR, "$tmp/sortfiledir.deb") or die "where is sortfiledir.deb?\n";
|
||||||
while (<FILEDIR>) {
|
while (<FILEDIR>) {
|
||||||
$x = 1 if $x == 6;
|
$x = 1 if $x == 6;
|
||||||
print "|\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 "-\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++;
|
||||||
my ($place, $packname) = split(/ -> /,$_,2);
|
my ($place, $packname) = split(/ -> /,$_,2);
|
||||||
push(@tempholder,"$place -> $packname");
|
push(@tempholder,"$place -> $packname");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user