catalyst: Add 'snapshot_name' default
authorBrian Dolbec <dolsen@gentoo.org>
Tue, 8 Jan 2013 07:17:22 +0000 (23:17 -0800)
committerMatt Turner <mattst88@gmail.com>
Sun, 15 Dec 2013 04:17:29 +0000 (20:17 -0800)
W. Trevor King: Refactored Git history for Brian Dolbec's content changes.

Reviewed-by: Matt Turner <mattst88@gentoo.org>
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
catalyst
modules/generic_stage_target.py
modules/snapshot_target.py

index 0fc65b0de19f4363f73ed642763134f95ff52623..131529ae4c60e7d5717acd5c7252ef6f6c06756d 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -68,6 +68,7 @@ def parse_config(myconfig):
                "portdir": "/usr/portage",
                "repo_name": "portage",
                "sharedir": "/usr/share/catalyst",
+               "snapshot_name": "portage-",
                "snapshot_cache": "/var/tmp/catalyst/snapshot_cache",
                "storedir": "/var/tmp/catalyst",
                }
index 6ee35d286ead28e91cd373aa162232d083bab3ee..63661fe18e8e23028f905e04c96ba0a0c1b5ea32 100644 (file)
@@ -410,7 +410,8 @@ class generic_stage_target(generic_target):
 
        def set_snapshot_path(self):
                self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
-                       "/snapshots/portage-"+self.settings["snapshot"]+".tar.xz")
+                       "/snapshots/" + self.settings["snapshot_name"] +
+                       self.settings["snapshot"] + ".tar.xz")
 
                if os.path.exists(self.settings["snapshot_path"]):
                        self.settings["snapshot_path_hash"]=\
@@ -418,7 +419,8 @@ class generic_stage_target(generic_target):
                                hash_function=self.settings["hash_function"],verbose=False)
                else:
                        self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\
-                               "/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
+                               "/snapshots/" + self.settings["snapshot_name"] +
+                               self.settings["snapshot"] + ".tar.bz2")
 
                        if os.path.exists(self.settings["snapshot_path"]):
                                self.settings["snapshot_path_hash"]=\
index 02b9831611b6e27cf6112c53fe76bc072e162748..ba1bab5528e41fab33dbb390a421305fbd35f267 100644 (file)
@@ -18,8 +18,9 @@ class snapshot_target(generic_stage_target):
                self.settings=myspec
                self.settings["target_subpath"]="portage"
                st=self.settings["storedir"]
-               self.settings["snapshot_path"]=normpath(st+"/snapshots/portage-"+self.settings["version_stamp"]\
-                       +".tar.bz2")
+               self.settings["snapshot_path"] = normpath(st + "/snapshots/"
+                       + self.settings["snapshot_name"]
+                       + self.settings["version_stamp"] + ".tar.bz2")
                self.settings["tmp_path"]=normpath(st+"/tmp/"+self.settings["target_subpath"])
 
        def setup(self):