[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.47-40-g31a624f

Andreas Beckmann debian at abeckmann.de
Thu Nov 29 15:29:24 UTC 2012


The following commit has been merged in the develop branch:
commit 33062a831b38b41661bb35372d667697cf8c78aa
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jul 22 12:34:38 2012 +0200

    p: use rm -rf --one-file-system
    
    this should be a more save approach than shutil.rmtree() in case
    something was not properly unmounted
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/debian/changelog b/debian/changelog
index a32d1c8..70cbf65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ piuparts (0.48) UNRELEASED; urgency=low
       in --install-purge-install mode.
     - Add --install-recommends option, disabled by default.
     - Mark temporary directories with a .piuparts.tmpdir file.
+    - Use rm -rf --one-file-system to delete chroots.
   * piuparts.conf:
     - New per section settings: expire-old-days, expire-fail-days (defaulting
       to 0 which means expiration is disabled).
diff --git a/piuparts.py b/piuparts.py
index 607d23e..ded14e3 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -814,7 +814,7 @@ class Chroot:
                 logging.debug("Terminate schroot session '%s'" % self.name)
                 run(['schroot', '--end-session', '--chroot', "session:" + self.schroot_session])
             if not settings.schroot:
-                shutil.rmtree(self.name)
+                run(['rm', '-rf', '--one-file-system', self.name])
                 if os.path.exists(self.name):
                     create_file(os.path.join(self.name, ".piuparts.tmpdir"), "removal failed")
                 logging.debug("Removed directory tree at %s" % self.name)

-- 
piuparts git repository



More information about the Piuparts-commits mailing list