Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv2977

Modified Files:
      Tag: branch_0_25
        ChangeLog Engine.pm 
Log Message:
backport some "fink cleanup" fixes from HEAD


Index: Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.381
retrieving revision 1.381.2.1
diff -u -d -r1.381 -r1.381.2.1
--- Engine.pm   15 Sep 2006 15:54:42 -0000      1.381
+++ Engine.pm   25 Sep 2006 02:48:50 -0000      1.381.2.1
@@ -1031,6 +1031,7 @@
                [ 'dpkg-status'   => \$modes{dpkg},
                        "Remove uninstalled packages from dpkg status 
database." ],
 #              [ 'obsoletes'     => \$modes{obs},      "Uninstall obsolete 
packages." ],
+               [ 'all|a'         => \$modes{all},      "All of the above 
actions." ],
                [ 'keep-src|k'    => \$opts{keep_old},
                        "Move old source files to $basepath/src/old/ instead of 
deleting them." ],
                [ 'dry-run|d'     => \$opts{dryrun},
@@ -1038,22 +1039,23 @@
        ], [EMAIL PROTECTED], helpformat => <<HELPFORMAT,
 %intro{[mode(s) and options]}
 One or more of the following modes must be specified:
-%opts{sources,debs,buildlocks,dpkg-status}
+%opts{sources,debs,buildlocks,dpkg-status,all}
 
 Options:
 %opts{keep-src,dry-run,help}
 
 HELPFORMAT
-               validate => sub {
-                       !scalar(grep { $_ } values %modes) && $VALIDATE_HELP
-               },
        );
+
+       # use legacy action if no explicit modes given
+       # (must not fail...this is how FinkCommander calls it)
+       $modes{srcs} = $modes{debs} = 1 if !scalar(grep { $_ } values %modes);
        
-       $modes{srcs} && &cleanup_sources(%opts);
-       $modes{debs} && &cleanup_debs(%opts);
-       $modes{bl}   && &cleanup_buildlocks(%opts, internally=>0);
-       $modes{obs}  && &cleanup_obsoletes(%opts);
-       $modes{dpkg} && &cleanup_dpkg_status(%opts);
+       ($modes{srcs} || $modes{all}) && &cleanup_sources(%opts);
+       ($modes{debs} || $modes{all}) && &cleanup_debs(%opts);
+       ($modes{bl}   || $modes{all}) && &cleanup_buildlocks(%opts, 
internally=>0);
+       ($modes{obs}  || $modes{all}) && &cleanup_obsoletes(%opts);
+       ($modes{dpkg} || $modes{all}) && &cleanup_dpkg_status(%opts);
 }
 
 =item cleanup_*

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1378.2.1
retrieving revision 1.1378.2.2
diff -u -d -r1.1378.2.1 -r1.1378.2.2
--- ChangeLog   19 Sep 2006 23:37:11 -0000      1.1378.2.1
+++ ChangeLog   25 Sep 2006 02:48:50 -0000      1.1378.2.2
@@ -1,3 +1,7 @@
+2006-09-24  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * Engine.pm: backport "fink cleanup" --all and default action.
+
 2006-09-18  Christian Schaffner  <[EMAIL PROTECTED]>
 
        * Checksum/SHA1.pm: Fix bug in matching of SHA1 line if Digest::<foo> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to