Attached please find the patch from experimental.

Best,
Michael

2009-03-20  Michael Tautschnig  <m...@debian.org>

        * bin/install_packages: Changed semantics of class lists in PACKAGES 
lines to
                Boolean AND and added negation (thanks Jürgen Kahnert for the 
patch), see
                
https://lists.uni-koeln.de/pipermail/linux-fai-devel/2008q2/000530.html
                (closes: #479537)
Index: trunk/debian/NEWS
===================================================================
--- trunk.orig/debian/NEWS
+++ trunk/debian/NEWS   
@@ -1,3 +1,11 @@
+fai (3.2.18+experimental6) unstable; urgency=low
+
+  - Changed semantics of class lists in PACKAGES (install|aptitude|...) to
+    Boolean AND and added support for negation (using !), see also
+    https://lists.uni-koeln.de/pipermail/linux-fai-devel/2008q2/000530.html
+
+ -- Thomas Lange <la...@debian.org>  Fri, 20 Mar 2009 18:25:17 +0100
+
 fai (3.2.8) unstable; urgency=low
 
   - new partition tool setup-storage added
Index: trunk/bin/install_packages
===================================================================
--- trunk.orig/bin/install_packages
+++ trunk/bin/install_packages  
@@ -272,13 +272,21 @@
       # by default no classes are listed after this command so doit
       $doit = 1;
       if ($cllist) {
-       # no classes specified after PACKAGES command
+        # no classes specified after PACKAGES command
         # so add all packages listed
-       # use packages on for a list of classes
-       $doit = 0; # assume no class is defined
-       @oclasses = split(/\s+/,$cllist);
-       # if a listed class is defined, add the packaes, otherwise skip these 
packages
-       foreach (@oclasses) { exists $classisdef{$_} and $doit = 1;}
+        # use packages on for a list of classes
+        $doit = 0; # assume no class is defined
+        @oclasses = split(/\s+/,$cllist);
+        # if all listed class are defined, add the packaes, otherwise skip 
these packages
+        foreach (@oclasses) {
+          if (/^!/) {
+            s/^!//;
+            not exists $classisdef{$_} and $doit = 1 or $doit = 0 or last;
+          }
+          else {
+            exists $classisdef{$_} and $doit = 1 or $doit = 0 or last;
+          }
+        }
       }
       next;
     }

Attachment: pgp88c9oTyaFa.pgp
Description: PGP signature

Reply via email to