From: Brian Dolbec Date: Tue, 8 Jan 2013 07:17:22 +0000 (-0800) Subject: catalyst: Add 'repo_name' default X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c3314705e9ff3cf20ce6da3ffd5e56e989fdc695;p=catalyst.git catalyst: Add 'repo_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 e2291339..0fc65b0d 100755 --- a/catalyst +++ b/catalyst @@ -66,6 +66,7 @@ def parse_config(myconfig): "hash_function": "crc32", "options": "", "portdir": "/usr/portage", + "repo_name": "portage", "sharedir": "/usr/share/catalyst", "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", "storedir": "/var/tmp/catalyst", diff --git a/modules/snapshot_target.py b/modules/snapshot_target.py index e93a86a5..02b98316 100644 --- a/modules/snapshot_target.py +++ b/modules/snapshot_target.py @@ -46,11 +46,14 @@ class snapshot_target(generic_stage_target): if not os.path.exists(mytmp): os.makedirs(mytmp) - cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* "+\ - self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env) + cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ " + + "--exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* " + + self.settings["portdir"] + "/ " + mytmp + "/%s/" % self.settings["repo_name"], + "Snapshot failure", env=self.env) print "Compressing Portage snapshot tarball..." - cmd("tar -I lbzip2 -cf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\ + cmd("tar -I lbzip2 -cf " + self.settings["snapshot_path"] + " -C " + + mytmp + " " + self.settings["repo_name"], "Snapshot creation failure",env=self.env) self.gen_contents_file(self.settings["snapshot_path"])