From: Brian Dolbec Date: Tue, 8 Jan 2013 07:17:22 +0000 (-0800) Subject: catalyst: Add 'snapshot_name' default X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=26f8ce4eefd9c0e6d3858480b4d97df4f62a7454;p=catalyst.git catalyst: Add 'snapshot_name' default W. Trevor King: Refactored Git history for Brian Dolbec's content changes. Reviewed-by: Matt Turner Signed-off-by: W. Trevor King Signed-off-by: Brian Dolbec --- diff --git a/catalyst b/catalyst index 0fc65b0d..131529ae 100755 --- 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", } diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 6ee35d28..63661fe1 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -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"]=\ diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py index 02b98316..ba1bab55 100644 --- a/modules/snapshot_target.py +++ b/modules/snapshot_target.py @@ -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):