1 |
commit: 1cba3b8ec73d458e53a65f0be7275f7585dc2186 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 1 07:31:59 2013 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Nov 22 06:01:49 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=1cba3b8e |
7 |
|
8 |
Rename local unpack var to _unpack |
9 |
|
10 |
The method name was unpack, so rename the local var to _unpack to help avoid confusion. |
11 |
|
12 |
--- |
13 |
catalyst/base/stagebase.py | 18 +++++++++--------- |
14 |
catalyst/targets/livecd_stage2.py | 6 +++--- |
15 |
2 files changed, 12 insertions(+), 12 deletions(-) |
16 |
|
17 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
18 |
index 759afee..e2a98cf 100644 |
19 |
--- a/catalyst/base/stagebase.py |
20 |
+++ b/catalyst/base/stagebase.py |
21 |
@@ -657,7 +657,7 @@ class StageBase(TargetBase, ClearBase, GenBase): |
22 |
target, print_traceback=True) |
23 |
|
24 |
def unpack(self): |
25 |
- unpack=True |
26 |
+ _unpack=True |
27 |
|
28 |
clst_unpack_hash = self.resume.get("unpack") |
29 |
|
30 |
@@ -707,49 +707,49 @@ class StageBase(TargetBase, ClearBase, GenBase): |
31 |
if os.path.isdir(self.settings["source_path"]) \ |
32 |
and self.resume.is_enabled("unpack"): |
33 |
""" Autoresume is valid, SEEDCACHE is valid """ |
34 |
- unpack=False |
35 |
+ _unpack=False |
36 |
invalid_snapshot=False |
37 |
|
38 |
elif os.path.isfile(self.settings["source_path"]) \ |
39 |
and self.settings["source_path_hash"]==clst_unpack_hash: |
40 |
""" Autoresume is valid, tarball is valid """ |
41 |
- unpack=False |
42 |
+ _unpack=False |
43 |
invalid_snapshot=True |
44 |
|
45 |
elif os.path.isdir(self.settings["source_path"]) \ |
46 |
and self.resume.is_disabled("unpack"): |
47 |
""" Autoresume is invalid, SEEDCACHE """ |
48 |
- unpack=True |
49 |
+ _unpack=True |
50 |
invalid_snapshot=False |
51 |
|
52 |
elif os.path.isfile(self.settings["source_path"]) \ |
53 |
and self.settings["source_path_hash"]!=clst_unpack_hash: |
54 |
""" Autoresume is invalid, tarball """ |
55 |
- unpack=True |
56 |
+ _unpack=True |
57 |
invalid_snapshot=True |
58 |
else: |
59 |
""" No autoresume, SEEDCACHE """ |
60 |
if "seedcache" in self.settings["options"]: |
61 |
""" SEEDCACHE so let's run rsync and let it clean up """ |
62 |
if os.path.isdir(self.settings["source_path"]): |
63 |
- unpack=True |
64 |
+ _unpack=True |
65 |
invalid_snapshot=False |
66 |
elif os.path.isfile(self.settings["source_path"]): |
67 |
""" Tarball so unpack and remove anything already there """ |
68 |
- unpack=True |
69 |
+ _unpack=True |
70 |
invalid_snapshot=True |
71 |
""" No autoresume, no SEEDCACHE """ |
72 |
else: |
73 |
""" Tarball so unpack and remove anything already there """ |
74 |
if os.path.isfile(self.settings["source_path"]): |
75 |
- unpack=True |
76 |
+ _unpack=True |
77 |
invalid_snapshot=True |
78 |
elif os.path.isdir(self.settings["source_path"]): |
79 |
""" We should never reach this, so something is very wrong """ |
80 |
raise CatalystError( |
81 |
"source path is a dir but seedcache is not enabled") |
82 |
|
83 |
- if unpack: |
84 |
+ if _unpack: |
85 |
self.mount_safety_check() |
86 |
|
87 |
if invalid_snapshot: |
88 |
|
89 |
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py |
90 |
index 7e24bca..82c69b0 100644 |
91 |
--- a/catalyst/targets/livecd_stage2.py |
92 |
+++ b/catalyst/targets/livecd_stage2.py |
93 |
@@ -87,7 +87,7 @@ class livecd_stage2(StageBase): |
94 |
myf.close() |
95 |
|
96 |
def unpack(self): |
97 |
- unpack=True |
98 |
+ _unpack=True |
99 |
display_msg=None |
100 |
|
101 |
clst_unpack_hash = self.resume.get("unpack") |
102 |
@@ -103,12 +103,12 @@ class livecd_stage2(StageBase): |
103 |
if os.path.isdir(self.settings["source_path"]) and \ |
104 |
self.resume.is_enabled("unpack"): |
105 |
print "Resume point detected, skipping unpack operation..." |
106 |
- unpack=False |
107 |
+ _unpack=False |
108 |
elif "source_path_hash" in self.settings: |
109 |
if self.settings["source_path_hash"] != clst_unpack_hash: |
110 |
invalid_snapshot=True |
111 |
|
112 |
- if unpack: |
113 |
+ if _unpack: |
114 |
self.mount_safety_check() |
115 |
if invalid_snapshot: |
116 |
print "No Valid Resume point detected, cleaning up ..." |