Cleanup stage directories properly for tar installs
authorEric Edgar <rocket@gentoo.org>
Fri, 7 Oct 2005 14:45:42 +0000 (14:45 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 7 Oct 2005 14:45:42 +0000 (14:45 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@851 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py

index 7476e28b2190a37d8039a90582aa8a737b1a19d4..2d061dc7f484b8300d9dd2ae3a1d63149a1ceb94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.343 2005/10/06 21:00:03 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.344 2005/10/07 14:45:42 rocket Exp $
+
+  07 Oct 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py:
+  Cleanup stage directories properly for tar installs
 
   06 Oct 2005; Eric Edgar <rocket@gentoo.org> modules/tinderbox_target.py:
   Tinderbox no longer cleans /tmp/*
index 23a4dd3bc56957d054e3b0dca48fb43c2fb06523..607aa9b451252c86b2398ef7a6ffad3de2b0a075 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.60 2005/10/06 17:26:51 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.61 2005/10/07 14:45:42 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -473,7 +473,6 @@ class generic_stage_target(generic_target):
                
        def unpack(self):
                unpack=True
-               invalid_snapshot=False
 
                clst_unpack_md5sum=read_from_clst(self.settings["autoresume_path"]+"unpack")
                
@@ -482,11 +481,13 @@ class generic_stage_target(generic_target):
                        display_msg="\nStarting rsync from "+self.settings["source_path"]+"\nto "+\
                                self.settings["chroot_path"]+" (This may take some time) ...\n"
                        error_msg="Rsync of "+self.settings["source_path"]+" to "+self.settings["chroot_path"]+" failed."
+                       invalid_snapshot=False
                else:
                        display_msg="\nStarting tar extract from "+self.settings["source_path"]+"\nto "+\
                                self.settings["chroot_path"]+" (This may take some time) ...\n"
                        unpack_cmd="tar xjpf "+self.settings["source_path"]+" -C "+self.settings["chroot_path"]
                        error_msg="Tarball extraction of "+self.settings["source_path"]+" to "+self.settings["chroot_path"]+" failed."
+                       invalid_snapshot=True
                
                
                if self.settings.has_key("AUTORESUME") and self.settings.has_key("SNAPCACHE") \
@@ -555,7 +556,7 @@ class generic_stage_target(generic_target):
                        if self.settings.has_key("AUTORESUME") \
                        and os.path.exists(self.settings["chroot_path"]+"/usr/portage/") \
                        and os.path.exists(self.settings["autoresume_path"]+"unpack_portage") \
-                       and self.settings["snapshot_path_md5sum"] == clst_unpack_portage_md5sum:
+                       and self.settings["snapshot_path_md5sum"] == snapshot_md5sum:
                                print "Valid Resume point detected, skipping unpack of portage tree..."
                                unpack=False