[Piuparts-commits] [piuparts] 02/05: p: reinstall packages missing from the base system without recommends

Holger Levsen holger at moszumanska.debian.org
Thu Dec 18 11:05:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 920a24f7dbd9381febb82db3f811d0f2ecf78c80
Author: Andreas Beckmann <anbe at debian.org>
Date:   Thu Dec 18 10:16:05 2014 +0100

    p: reinstall packages missing from the base system without recommends
    
    If installation of a package-to-be-tested caused the removal of some package
    from the base system (notably when switching init systems) these missing ones
    will be reinstalled upon removal (using
      apt-get remove ... $missing+
    syntax). Since this is an exact list of missing packages, use
    --no-install-recommends to prevent apt pulling in anthing else.
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 debian/changelog | 2 ++
 piuparts.py      | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 74b8299..de64cd7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ piuparts (0.62) UNRELEASED; urgency=medium
   * piuparts.py:
     - Increase verbosity when reporting things installed over directory
       symlinks: report all symlinks and their targets.
+    - Reinstall base system packages missing upon removal with
+      --no-install-recommends.
   * distros.conf: Reactivate 'testing' and 'stable' aliases, switch them back
     to 'jessie' and 'wheezy' for ongoing development.
   * piuparts-slave.py:
diff --git a/piuparts.py b/piuparts.py
index c18b575..710ca21 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1289,9 +1289,9 @@ class Chroot:
                         indent_string("\n".join(bad)))
 
     def remove_packages(self, packages):
-        """Remove packages in a chroot."""
+        """Remove packages in a chroot. May reinstall packages at the same time if they are suffixed with '+'."""
         if packages:
-            self.run(["apt-get", "remove"] + unqualify(packages), ignore_errors=True)
+            self.run(["apt-get", "remove", "--no-install-recommends"] + unqualify(packages), ignore_errors=True)
 
     def purge_packages(self, packages):
         """Purge packages in a chroot."""

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list