# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 26 Feb 2008; Andrew Gaffney <agaffney@gentoo.org>
+ modules/generic_stage_target.py:
+ Fix leading whitespace in empty() so it's only executed if there's something
+ to execute it on. Thanks to Justin Bronder <jsbronder@gentoo.org> in bug
+ 211410 for pointing this out
+
21 Feb 2008; Andrew Gaffney <agaffney@gentoo.org>
targets/support/rc-update.sh:
Quote baselayout package atom
self.settings[self.settings["spec_prefix"]+"/empty"]=\
self.settings[self.settings["spec_prefix"]+\
"/empty"].split()
- for x in self.settings[self.settings["spec_prefix"]+"/empty"]:
- myemp=self.settings["destpath"]+x
- if not os.path.isdir(myemp):
- print x,"not a directory or does not exist, skipping 'empty' operation."
- continue
- print "Emptying directory",x
- """
- stat the dir, delete the dir, recreate the dir and set
- the proper perms and ownership
- """
- mystat=os.stat(myemp)
- shutil.rmtree(myemp)
- os.makedirs(myemp,0755)
- os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
- os.chmod(myemp,mystat[ST_MODE])
+ for x in self.settings[self.settings["spec_prefix"]+"/empty"]:
+ myemp=self.settings["destpath"]+x
+ if not os.path.isdir(myemp):
+ print x,"not a directory or does not exist, skipping 'empty' operation."
+ continue
+ print "Emptying directory",x
+ """
+ stat the dir, delete the dir, recreate the dir and set
+ the proper perms and ownership
+ """
+ mystat=os.stat(myemp)
+ shutil.rmtree(myemp)
+ os.makedirs(myemp,0755)
+ os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
+ os.chmod(myemp,mystat[ST_MODE])
touch(self.settings["autoresume_path"]+"empty")
def remove(self):