mirror of
				https://github.com/fspc/dswim.git
				synced 2025-11-04 00:35:34 -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
 | 
			
		||||
#use diagnostics;
 | 
			
		||||
 | 
			
		||||
require 5.004;
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
@ -7,7 +7,7 @@ use strict;
 | 
			
		||||
#
 | 
			
		||||
#    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 
 | 
			
		||||
   # rememberance, and is just kept for testing purposes
 | 
			
		||||
   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;
 | 
			
		||||
         chdir("$ARGV[1]");         
 | 
			
		||||
         #consider readdir 
 | 
			
		||||
@ -91,7 +91,7 @@ my $home = $ENV{'HOME'} . "/";
 | 
			
		||||
     # Better check for packages which don't have /. in their *.list...
 | 
			
		||||
     # which is rare, but does happen.  Sometimes *.list(s) don't have
 | 
			
		||||
     # 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;
 | 
			
		||||
     foreach $thingy (sort @ppackage) {
 | 
			
		||||
       open(LIST, "$ARGV[1]/$thingy") or die "Humm, strange";
 | 
			
		||||
@ -102,8 +102,8 @@ my $home = $ENV{'HOME'} . "/";
 | 
			
		||||
        close(LIST);
 | 
			
		||||
        foreach (@count) {         
 | 
			
		||||
          $x = 1 if $x == 6;
 | 
			
		||||
          print "|\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 == 1 || $x == 4; print STDERR "/\r" if $x == 2;
 | 
			
		||||
          print STDERR "-\r" if $x == 3 || $x == 6; print STDERR "\\\r" if $x == 5;
 | 
			
		||||
          $x++;     
 | 
			
		||||
          chomp $_;
 | 
			
		||||
          # 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..
 | 
			
		||||
      # than split..reverse..and order.accordingly..this makes
 | 
			
		||||
      # 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 
 | 
			
		||||
      open(BIG, ">$ARGV[2]/big.debian") or die;
 | 
			
		||||
      open(LONG, ">$ARGV[2]/long.debian") or die;
 | 
			
		||||
      foreach $thingy (sort keys %HL ) {
 | 
			
		||||
          $x = 1 if $x == 6;
 | 
			
		||||
          print "|\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 == 1 || $x == 4; print "/\r" if $x == 2;
 | 
			
		||||
          print STDERR "-\r" if $x == 3 || $x == 6; print "\\\r" if $x == 5;
 | 
			
		||||
          $x++;
 | 
			
		||||
           # Humm, will split or grep be faster?
 | 
			
		||||
            #my $tingy  = "@{ $HL{$thingy} }" . " " .  @{ $HL{$thingy} };
 | 
			
		||||
@ -170,6 +170,6 @@ my $home = $ENV{'HOME'} . "/";
 | 
			
		||||
        close(BIG);
 | 
			
		||||
        close(LONG);
 | 
			
		||||
        #undef %HL;
 | 
			
		||||
        print "  Cleaning up\n"; 
 | 
			
		||||
        print STDERR "  Cleaning up\n"; 
 | 
			
		||||
 | 
			
		||||
__END__
 | 
			
		||||
 | 
			
		||||
@ -7,7 +7,7 @@ use strict;
 | 
			
		||||
#
 | 
			
		||||
#    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'} . "/";
 | 
			
		||||
 | 
			
		||||
   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;                                                                  
 | 
			
		||||
   }                                                                           
 | 
			
		||||
   else {
 | 
			
		||||
@ -71,8 +71,8 @@ line.
 | 
			
		||||
        close(LIST);                                                            
 | 
			
		||||
        foreach (@count) {                                                      
 | 
			
		||||
          $x = 1 if $x == 6;
 | 
			
		||||
          print "|\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 == 1 || $x == 4; print STDERR "/\r" if $x == 2;
 | 
			
		||||
          print STDERR "-\r" if $x == 3 || $x == 6; print STDERR "\\\r" if $x == 5;
 | 
			
		||||
          $x++;
 | 
			
		||||
          chomp $_;                                                             
 | 
			
		||||
          # does /. exist?  it should be first.                                 
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										56
									
								
								bin/longswim
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								bin/longswim
									
									
									
									
									
								
							@ -1,27 +1,33 @@
 | 
			
		||||
#!/usr/bin/perl -w
 | 
			
		||||
 | 
			
		||||
#use diagnostics;
 | 
			
		||||
use strict;
 | 
			
		||||
use DB_File;
 | 
			
		||||
 | 
			
		||||
################################################################################
 | 
			
		||||
#    Package administration and research tool for Debian                       #
 | 
			
		||||
#    Copyright (C) 1999-2000 Jonathan D. Rosenbaum                             #
 | 
			
		||||
#                                                                              #
 | 
			
		||||
#    This program is free software; you can redistribute it and/or modify      #
 | 
			
		||||
#    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 distributed in the hope that it will be useful,           #
 | 
			
		||||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of            #
 | 
			
		||||
#    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.#
 | 
			
		||||
################################################################################
 | 
			
		||||
############################################################################
 | 
			
		||||
#
 | 
			
		||||
#    Package administration and research tool for Debian                       
 | 
			
		||||
#
 | 
			
		||||
#    Copyright (C) 1999-2001 Jonathan D. Rosenbaum 
 | 
			
		||||
#
 | 
			
		||||
#                                                                             
 | 
			
		||||
#
 | 
			
		||||
#    This program is free software; you can redistribute it and/or modify 
 | 
			
		||||
#
 | 
			
		||||
#    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 distributed in the hope that it will be useful,         
 | 
			
		||||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of            
 | 
			
		||||
#    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
 | 
			
		||||
@ -44,7 +50,7 @@ SWIM::NDB_Init.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 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;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
@ -97,8 +103,8 @@ sub nmd {
 | 
			
		||||
             s,^(\./)+,,;  # filter for Debians altered dir structure 
 | 
			
		||||
             print CONTENTSDB $_;
 | 
			
		||||
          $x = 1 if $x == 6;
 | 
			
		||||
          print "|\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 == 1 || $x == 4; print STDERR "/\r" if $x == 2;
 | 
			
		||||
          print STDERR "-\r" if $x == 3 || $x == 6; print STDERR "\\\r" if $x == 5;
 | 
			
		||||
          $x++;             
 | 
			
		||||
             chomp $_;
 | 
			
		||||
             # find all directories
 | 
			
		||||
@ -448,14 +454,14 @@ sub nmd {
 | 
			
		||||
    close(FILEDIR);
 | 
			
		||||
    close(CONTENTS);
 | 
			
		||||
 | 
			
		||||
    print "Compress contents\n";
 | 
			
		||||
    print STDERR "Compress contents\n";
 | 
			
		||||
    system "$gzip", "-9", "$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
 | 
			
		||||
    # process hang and respawn itself - something which sometimes happens
 | 
			
		||||
    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 
 | 
			
		||||
    #undef %all;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										56
									
								
								bin/slowswim
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								bin/slowswim
									
									
									
									
									
								
							@ -1,28 +1,32 @@
 | 
			
		||||
#!/usr/bin/perl -w
 | 
			
		||||
 | 
			
		||||
#use diagnostics;
 | 
			
		||||
use strict;
 | 
			
		||||
 | 
			
		||||
################################################################################
 | 
			
		||||
#    Package administration and research tool for Debian                       #
 | 
			
		||||
#    Copyright (C) 1999-2000 Jonathan D. Rosenbaum                             #
 | 
			
		||||
#                                                                              #
 | 
			
		||||
#    This program is free software; you can redistribute it and/or modify      #
 | 
			
		||||
#    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 distributed in the hope that it will be useful,           #
 | 
			
		||||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of            #
 | 
			
		||||
#    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.#
 | 
			
		||||
################################################################################
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
############################################################################
 | 
			
		||||
#
 | 
			
		||||
#    Package administration and research tool for Debian                       
 | 
			
		||||
#
 | 
			
		||||
#    Copyright (C) 1999-2001 Jonathan D. Rosenbaum 
 | 
			
		||||
#
 | 
			
		||||
#                                                                             
 | 
			
		||||
#
 | 
			
		||||
#    This program is free software; you can redistribute it and/or modify 
 | 
			
		||||
#
 | 
			
		||||
#    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 distributed in the hope that it will be useful,         
 | 
			
		||||
#    but WITHOUT ANY WARRANTY; without even the implied warranty of            
 | 
			
		||||
#    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
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 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;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
@ -51,18 +55,18 @@ sub pre_md {
 | 
			
		||||
  my $fcount = 0;
 | 
			
		||||
  my @tempholder;
 | 
			
		||||
 | 
			
		||||
  print "Sorting everything\n";
 | 
			
		||||
  print STDERR "Sorting everything\n";
 | 
			
		||||
  system ("$sort $tmp/filedir.deb > $tmp/sortfiledir.deb");
 | 
			
		||||
  unlink("$tmp/filedir.deb");
 | 
			
		||||
 | 
			
		||||
    # 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;
 | 
			
		||||
     open(FILEDIR, "$tmp/sortfiledir.deb") or die "where is sortfiledir.deb?\n";
 | 
			
		||||
         while (<FILEDIR>) {
 | 
			
		||||
          $x = 1 if $x == 6;
 | 
			
		||||
          print "|\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 == 1 || $x == 4; print STDERR "/\r" if $x == 2;
 | 
			
		||||
          print STDERR "-\r" if $x == 3 || $x == 6; print STDERR "\\\r" if $x == 5;
 | 
			
		||||
          $x++;
 | 
			
		||||
             my ($place, $packname) = split(/ -> /,$_,2);
 | 
			
		||||
             push(@tempholder,"$place -> $packname");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user