1 |
Author: agaffney |
2 |
Date: 2008-02-26 03:11:14 +0000 (Tue, 26 Feb 2008) |
3 |
New Revision: 1326 |
4 |
|
5 |
Modified: |
6 |
trunk/ChangeLog |
7 |
trunk/modules/generic_stage_target.py |
8 |
Log: |
9 |
Fix leading whitespace in empty() so it's only executed if there's something to execute it on. Thanks to Justin Bronder <jsbronder@g.o> in bug 211410 for pointing this out |
10 |
|
11 |
Modified: trunk/ChangeLog |
12 |
=================================================================== |
13 |
--- trunk/ChangeLog 2008-02-21 21:53:36 UTC (rev 1325) |
14 |
+++ trunk/ChangeLog 2008-02-26 03:11:14 UTC (rev 1326) |
15 |
@@ -1,6 +1,12 @@ |
16 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
17 |
# $Id: $ |
18 |
|
19 |
+ 26 Feb 2008; Andrew Gaffney <agaffney@g.o> |
20 |
+ modules/generic_stage_target.py: |
21 |
+ Fix leading whitespace in empty() so it's only executed if there's something |
22 |
+ to execute it on. Thanks to Justin Bronder <jsbronder@g.o> in bug |
23 |
+ 211410 for pointing this out |
24 |
+ |
25 |
21 Feb 2008; Andrew Gaffney <agaffney@g.o> |
26 |
targets/support/rc-update.sh: |
27 |
Quote baselayout package atom |
28 |
|
29 |
Modified: trunk/modules/generic_stage_target.py |
30 |
=================================================================== |
31 |
--- trunk/modules/generic_stage_target.py 2008-02-21 21:53:36 UTC (rev 1325) |
32 |
+++ trunk/modules/generic_stage_target.py 2008-02-26 03:11:14 UTC (rev 1326) |
33 |
@@ -1156,21 +1156,21 @@ |
34 |
self.settings[self.settings["spec_prefix"]+"/empty"]=\ |
35 |
self.settings[self.settings["spec_prefix"]+\ |
36 |
"/empty"].split() |
37 |
- for x in self.settings[self.settings["spec_prefix"]+"/empty"]: |
38 |
- myemp=self.settings["destpath"]+x |
39 |
- if not os.path.isdir(myemp): |
40 |
- print x,"not a directory or does not exist, skipping 'empty' operation." |
41 |
- continue |
42 |
- print "Emptying directory",x |
43 |
- """ |
44 |
- stat the dir, delete the dir, recreate the dir and set |
45 |
- the proper perms and ownership |
46 |
- """ |
47 |
- mystat=os.stat(myemp) |
48 |
- shutil.rmtree(myemp) |
49 |
- os.makedirs(myemp,0755) |
50 |
- os.chown(myemp,mystat[ST_UID],mystat[ST_GID]) |
51 |
- os.chmod(myemp,mystat[ST_MODE]) |
52 |
+ for x in self.settings[self.settings["spec_prefix"]+"/empty"]: |
53 |
+ myemp=self.settings["destpath"]+x |
54 |
+ if not os.path.isdir(myemp): |
55 |
+ print x,"not a directory or does not exist, skipping 'empty' operation." |
56 |
+ continue |
57 |
+ print "Emptying directory",x |
58 |
+ """ |
59 |
+ stat the dir, delete the dir, recreate the dir and set |
60 |
+ the proper perms and ownership |
61 |
+ """ |
62 |
+ mystat=os.stat(myemp) |
63 |
+ shutil.rmtree(myemp) |
64 |
+ os.makedirs(myemp,0755) |
65 |
+ os.chown(myemp,mystat[ST_UID],mystat[ST_GID]) |
66 |
+ os.chmod(myemp,mystat[ST_MODE]) |
67 |
touch(self.settings["autoresume_path"]+"empty") |
68 |
|
69 |
def remove(self): |
70 |
|
71 |
-- |
72 |
gentoo-commits@l.g.o mailing list |