[Fai-commit] r3167 - trunk/bin

fai-repository at svn.debian.org fai-repository at svn.debian.org
Sat Dec 10 17:40:01 UTC 2005


Author: lange
Date: 2005-12-10 17:40:00 +0000 (Sat, 10 Dec 2005)
New Revision: 3167

Modified:
   trunk/bin/install_packages
Log:
make piece of code more cleaner


Modified: trunk/bin/install_packages
===================================================================
--- trunk/bin/install_packages	2005-12-10 17:39:19 UTC (rev 3166)
+++ trunk/bin/install_packages	2005-12-10 17:40:00 UTC (rev 3167)
@@ -25,7 +25,7 @@
 # MA 02111-1307, USA.
 #*********************************************************************
 
-my $version = "Version 2.18, 6-dec-2005";
+my $version = "Version 2.19, 10-dec-2005";
 $0=~ s#.+/##; # remove path from program name
 
 # import variables: $verbose, $MAXPACKAGES, $classes, $FAI, $FAI_ROOT
@@ -319,12 +319,9 @@
   # ignore packages ending with - when using -d
   @complete = grep {!/-$/} @complete if $opt_d; 
 
-  foreach (reverse @complete) {
-    my $pack;
-    if ( /^(.*)[_=+-]$/ and $1 and $cache->exists($1)) {
+  foreach my $pack (reverse @complete) {
+    if ( $pack =~ /^(.*)[_=+-]$/ and $1 and $cache->exists($1)) {
       $pack = $1;
-    } else {
-      $pack = $_;
     }
     if (! defined ($complete{$pack})) {
       $complete{$pack} = 1;




More information about the Fai-commit mailing list