--- vanilla/usr/sbin/install_packages 2009-11-03 10:23:51.000000000 +0100 +++ patched/usr/sbin/install_packages 2009-11-05 17:09:32.000000000 +0100 @@ -69,7 +69,8 @@ # @commands is the order of the commands that are executed -our @commands = qw/y2i y2r yast rpmr urpmi urpme yumgroup yumi yumr smarti smartr hold taskrm taskinst clean-internal aptitude aptitude-r install unpack remove dselect-upgrade/; +our @commands = qw/y2i y2r zypper yast rpmr urpmi urpme yumgroup yumi yumr smarti smartr hold taskrm taskinst clean-internal aptitude aptitude-r install unpack remove dselect-upgrade/; + %command = ( "install" => "apt-get $aptopt --fix-missing install", "inst-internal" => "apt-get $aptopt --fix-missing -s install", @@ -90,6 +91,7 @@ "yumi" => "yum -y install", "yumr" => "yum -y remove", "yumgroup" => "yum -y groupinstall", + "zypper" => "zypper -n install", "y2i" => "y2pmsh isc", "y2r" => "y2pmsh remove", "yast" => "yast -i", @@ -272,13 +274,20 @@ # 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; }