From: Eric Edgar Date: Thu, 6 Oct 2005 17:26:51 +0000 (+0000) Subject: Fix catalyst so it fully disables snapcache when its not specified in the config... X-Git-Tag: CATALYST_2_0_6_916~647 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ce5ac4ff60c69397393dc26773b5b761f4bbea9;p=catalyst.git Fix catalyst so it fully disables snapcache when its not specified in the config file git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@847 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index dd50b978..a4dd48ad 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.339 2005/10/06 15:50:02 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.340 2005/10/06 17:26:51 rocket Exp $ + + 06 Oct 2005; Eric Edgar + modules/generic_stage_target.py: + Fix catalyst so it fully disables snapcache when its not specified in the + config file 06 Oct 2005; Chris Gianelloni catalyst, examples/livecd-stage2_template.spec: diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 0fc2689b..23a4dd3b 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.59 2005/09/15 15:17:27 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.60 2005/10/06 17:26:51 rocket Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -530,10 +530,10 @@ class generic_stage_target(generic_target): def unpack_snapshot(self): unpack=True - snapshot_cache_md5sum=read_from_clst(self.settings["snapshot_cache_path"]+"catalyst-md5sum") snapshot_md5sum=read_from_clst(self.settings["autoresume_path"]+"unpack_portage") if self.settings.has_key("SNAPCACHE"): + snapshot_cache_md5sum=read_from_clst(self.settings["snapshot_cache_path"]+"catalyst-md5sum") destdir=self.settings["snapshot_cache_path"] unpack_cmd="tar xjpf "+self.settings["snapshot_path"]+" -C "+destdir unpack_errmsg="Error unpacking snapshot" @@ -551,7 +551,6 @@ class generic_stage_target(generic_target): cleanup_msg="Cleaning up existing portage tree (This can take a long time) ..." unpack_cmd="tar xjpf "+self.settings["snapshot_path"]+" -C "+self.settings["chroot_path"]+"/usr" unpack_errmsg="Error unpacking snapshot" - self.snapshot_lock_object=self.snapshot_lock if self.settings.has_key("AUTORESUME") \ and os.path.exists(self.settings["chroot_path"]+"/usr/portage/") \ @@ -563,7 +562,8 @@ class generic_stage_target(generic_target): if unpack: - self.snapshot_lock_object.write_lock() + if self.settings.has_key("SNAPCACHE"): + self.snapshot_lock_object.write_lock() if os.path.exists(destdir): print cleanup_msg cleanup_cmd="rm -rf "+destdir @@ -585,7 +585,8 @@ class generic_stage_target(generic_target): myf.write(self.settings["snapshot_path_md5sum"]) myf.close() - self.snapshot_lock_object.unlock() + if self.settings.has_key("SNAPCACHE"): + self.snapshot_lock_object.unlock() def config_profile_link(self): if self.settings.has_key("AUTORESUME") \