catalyst: Add 'repo_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:27 +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/snapshot_target.py

index e2291339e44b635695776387e16016e017819659..0fc65b0de19f4363f73ed642763134f95ff52623 100755 (executable)
--- 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",
index e93a86a5b375442ee4971704c071a95230059a6e..02b9831611b6e27cf6112c53fe76bc072e162748 100644 (file)
@@ -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"])