From a42b70dc8df69b03122a82e36d26fc1bfb5b4c7a Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Tue, 9 Aug 2005 19:25:08 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@822 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- modules/catalyst_support.py | 4 ++-- modules/generic_stage_target.py | 8 +++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38ca5f81..bafbfc32 100644 --- 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 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 AUTHORS, arch/hppa.py, catalyst, examples/livecd-stage2_template.spec, diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 2de4debd..982971b9 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -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: diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 522e5555..efc7a763 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -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() -- 2.26.2