From c3314705e9ff3cf20ce6da3ffd5e56e989fdc695 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Mon, 7 Jan 2013 23:17:22 -0800 Subject: [PATCH] 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 --- catalyst | 1 + modules/snapshot_target.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) 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"]) -- 2.26.2