fix missing os. in os.popen. and clear the autoresume flags if the chroot is invalid...
authorEric Edgar <rocket@gentoo.org>
Tue, 9 Aug 2005 19:25:08 +0000 (19:25 +0000)
committerEric Edgar <rocket@gentoo.org>
Tue, 9 Aug 2005 19:25:08 +0000 (19:25 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@822 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/catalyst_support.py
modules/generic_stage_target.py

index 38ca5f811eda2156c0ebada302a2f3211e263713..bafbfc320cb83c0c95858688502219c6b603ee45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.314 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.315 2005/08/09 19:25:08 rocket Exp $
+
+  09 Aug 2005; Eric Edgar <rocket@gentoo.org> modules/catalyst_support.py,
+  modules/generic_stage_target.py:
+  fix missing os. in os.popen. and clear the autoresume flags if the chroot is
+  invalid. Fix SEEDCACHE unpack issue when needing to use tarball.
 
   09 Aug 2005; Eric Edgar <rocket@gentoo.org> AUTHORS, arch/hppa.py,
   catalyst, examples/livecd-stage2_template.spec,
index 2de4debd4367bdecec8ef920df60037b964d0422..982971b98eeca58aded2bdc8dadd5f7d3fdca9f6 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/catalyst_support.py,v 1.54 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.55 2005/08/09 19:25:08 rocket Exp $
 
 import sys,string,os,types,re,signal,traceback,md5,time
 selinux_capable = False
@@ -627,7 +627,7 @@ def ismount(path):
        "enhanced to handle bind mounts"
        if os.path.ismount(path):
                return 1
-       a=popen("mount")
+       a=os.popen("mount")
        mylines=a.readlines()
        a.close()
        for line in mylines:
index 522e5555d8bff82c465e0b70f39e37e9dfac4db0..efc7a763a0e316e48bb8870e8d14234b8cb1de0d 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.54 2005/08/09 14:24:45 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.55 2005/08/09 19:25:08 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -472,12 +472,14 @@ class generic_stage_target(generic_target):
 
                clst_unpack_md5sum=read_from_clst(self.settings["autoresume_path"]+"unpack")
                
-               if self.settings.has_key("SNAPCACHE"): 
+               if self.settings.has_key("SEEDCACHE") and os.path.isdir(self.settings["source_path"]): 
                        unpack_cmd="rsync -a --delete "+self.settings["source_path"]+" "+self.settings["chroot_path"]
                        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."
                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."
                
@@ -496,7 +498,7 @@ class generic_stage_target(generic_target):
                        if invalid_snapshot:
                                print "InValid Resume point detected, cleaning up  ..."
                                #os.remove(self.settings["autoresume_path"]+"dir_setup")        
-                               os.remove(self.settings["autoresume_path"]+"unpack")    
+                               self.clear_autoresume()
                                self.clear_chroot()
                                #self.dir_setup()