[Fai-commit] r5505 - in trunk: bin debian

Thomas Lange lange at alioth.debian.org
Fri Aug 28 04:04:12 UTC 2009


Author: lange
Date: 2009-08-28 04:04:05 +0000 (Fri, 28 Aug 2009)
New Revision: 5505

Modified:
   trunk/bin/install_packages
   trunk/debian/changelog
Log:
  write list of all packages to packages.list

Modified: trunk/bin/install_packages
===================================================================
--- trunk/bin/install_packages	2009-08-19 19:40:19 UTC (rev 5504)
+++ trunk/bin/install_packages	2009-08-28 04:04:05 UTC (rev 5505)
@@ -27,7 +27,7 @@
 # MA 02111-1307, USA.
 #*********************************************************************
 
-my $version = "Version 4.1.7, 24-july-2009";
+my $version = "Version 4.1.8, 27-august-2009";
 $0=~ s#.+/##; # remove path from program name
 
 # import variables: $verbose, $MAXPACKAGES, $classes, $FAI, $FAI_ROOT
@@ -374,18 +374,21 @@
   # nothing to do, when no Debian types/commands are used at all
   unless ($hasdebian) {
     @known = @complete;
+    writepackages();
     return;
   }
 
   # no package name checking when using smart
   if ($atype eq "smarti" || $atype eq "smartr") {
     @known=@complete;
+    writepackages();
     return;
   }
 
   # no package name checking when -N was given
   if ($opt_N) {
     @known=@complete;
+    writepackages();
     return;
   }
 
@@ -407,6 +410,7 @@
   # is used. This is because we can't check task names, which are supported by aptitude
   if ($atype eq "aptitude") {
     @known=@orig;
+    writepackages();
     return;
   }
 
@@ -446,9 +450,21 @@
       push @unknown, $pack;
     }
   }
+
+  writepackages();
   warn "WARNING: These unknown packages are removed from the installation list: " . join(' ',sort @unknown) . "\n" if @unknown;
 }
+
 # - - - - - - - - - - - - - - - - - - - - - - - - - - -
+sub writepackages {
+
+  # write package list to log file
+  open(LIST,"> $FAI_ROOT/tmp/packages.list") || warn "ERROR $0: Can't write package list file: $!\n";
+  print LIST "# List of all packages that will be installed\n";
+  for (@known) { print LIST "$_\n"; }
+  close(LIST);
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - -
 sub usage {
 
   print << "EOF";

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-08-19 19:40:19 UTC (rev 5504)
+++ trunk/debian/changelog	2009-08-28 04:04:05 UTC (rev 5505)
@@ -56,6 +56,7 @@
   * 20-hwdetect.source, DEMO/10-misc,10-conffiles: apply patch from
     Michael, that skip somme commands on softupdate
   * install_packages: do not call AptPkg function when -N was given
+    write list of all packages to packages.list
   * 10-base-classes: replace --print-installation-architecture by
     --print-architecture
   * make-fai-nfsroot, DEMO/10-misc,FAIBASE/10-misc: chpasswd does not




More information about the Fai-commit mailing list