Your message dated Sun, 23 Oct 2011 10:44:26 +0200
with message-id <[email protected]>
and subject line Re: PACKAGES remove
has caused the Debian Bug report #632211,
regarding fai: PACKAGES remove and unknown packages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
632211: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632211
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fai
Version: 3.4.1
Severity: minor


"PACKAGES remove" works as expected as long as the mirror knows about all the 
packages listed after that command. But if the mirror does not include one of 
these packages (which makes sense because you don't want to install them), you 
get the error "E: Couldn't find package <package>". The problem is, that 
apt-get in this case won't uninstall any other package either, even if the 
mirror knows about these packages. This is especially a problem on CD-installs 
where you usually don't have a complete mirror.

The attached patch adds a command "aptitude-remove" (similar to "remove") which 
uses aptitude instead of apt-get. aptitude handles unknown packages as expected 
(uninstall known packages, warn about unknown packages).
#! /bin/sh /usr/share/dpatch/dpatch-run
## 30_aptitude-remove.dpatch by Thilo Uttendorfer <[email protected]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad fai-3.4.1.cb1.2~/bin/install_packages fai-3.4.1.cb1.2/bin/install_packages
--- fai-3.4.1.cb1.2~/bin/install_packages	2011-06-29 16:47:00.000000000 +0200
+++ fai-3.4.1.cb1.2/bin/install_packages	2011-06-29 16:48:21.000000000 +0200
@@ -68,7 +68,7 @@
 
 
 # @commands is the order of the commands that are executed
-our @commands = qw/y2i y2r zypper zypper-rm 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 zypper-rm yast rpmr urpmi urpme yumgroup yumi yumr smarti smartr hold taskrm taskinst clean-internal aptitude aptitude-r install unpack remove aptitude-remove dselect-upgrade/;
 %command = (
           "install" => "apt-get $aptopt --fix-missing install",
     "inst-internal" => "apt-get $aptopt --fix-missing -s install",
@@ -80,6 +80,7 @@
    "clean-internal" => "apt-get clean",
          "aptitude" => "aptitude -R $aptopt install",
        "aptitude-r" => "aptitude -r $aptopt install",
+  "aptitude-remove" => "aptitude $aptopt remove",
            "unpack" => "cd $downloaddir; aptitude download",
   "unpack-internal" => "dpkg --unpack --recursive $downloaddir; rm $downloaddir/*.deb",
  "pending-internal" => "dpkg --configure --pending",
@@ -138,7 +139,7 @@
 }
 
 # check if any Debian related commands/types are used in package_config
-my @debiantypes= qw/taskinst aptitude aptitude-r install remove dselect-upgrade smarti/;
+my @debiantypes= qw/taskinst aptitude aptitude-r aptitude-remove install remove dselect-upgrade smarti/;
 foreach my $dt (@debiantypes) {
   $types{$dt} and $hasdebian=1;
 }

--- End Message ---
--- Begin Message ---
The roblem can be solved as mentioned by Holger with PACKAGES aptitude
and "-" to remove packages. An "aptitude-remove" command is not
necessary.


--
Thilo Uttendorfer
Linux Information Systems AG




--- End Message ---

Reply via email to