1 |
From b5410d12852222fca19e01cfdcbb37e87b6f21ff Mon Sep 17 00:00:00 2001 |
2 |
From: Brian Dolbec <dolsen@g.o> |
3 |
Date: Thu, 9 Mar 2017 01:17:07 -0800 |
4 |
Subject: [PATCH 5/7] targets/snapshot.py: Update the code and log messages to |
5 |
use the configured repo_name |
6 |
To: gentoo-catalyst@l.g.o |
7 |
|
8 |
One more portage name seperation from being used to represent the ebuild repository. |
9 |
--- |
10 |
catalyst/targets/snapshot.py | 13 +++++++------ |
11 |
1 file changed, 7 insertions(+), 6 deletions(-) |
12 |
|
13 |
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py |
14 |
index 8a9acdd9..087834eb 100644 |
15 |
--- a/catalyst/targets/snapshot.py |
16 |
+++ b/catalyst/targets/snapshot.py |
17 |
@@ -22,7 +22,7 @@ class snapshot(TargetBase, GenBase): |
18 |
TargetBase.__init__(self, myspec, addlargs) |
19 |
GenBase.__init__(self,myspec) |
20 |
#self.settings=myspec |
21 |
- self.settings["target_subpath"]="portage" |
22 |
+ self.settings["target_subpath"]="repos" |
23 |
st=self.settings["storedir"] |
24 |
self.settings["snapshot_path"] = normpath(st + "/snapshots/" |
25 |
+ self.settings["snapshot_name"] |
26 |
@@ -46,8 +46,9 @@ class snapshot(TargetBase, GenBase): |
27 |
|
28 |
success = True |
29 |
self.setup() |
30 |
- log.notice('Creating Portage tree snapshot %s from %s ...', |
31 |
- self.settings['version_stamp'], self.settings['portdir']) |
32 |
+ log.notice('Creating %s tree snapshot %s from %s ...', |
33 |
+ self.settings["repo_name"], self.settings['version_stamp'], |
34 |
+ self.settings['portdir']) |
35 |
|
36 |
mytmp=self.settings["tmp_path"] |
37 |
ensure_dirs(mytmp) |
38 |
@@ -63,7 +64,7 @@ class snapshot(TargetBase, GenBase): |
39 |
mytmp + '/' + self.settings['repo_name'] + '/'], |
40 |
env=self.env) |
41 |
|
42 |
- log.notice('Compressing Portage snapshot tarball ...') |
43 |
+ log.notice('Compressing %s snapshot tarball ...', self.settings["repo_name"]) |
44 |
compressor = CompressMap(self.settings["compress_definitions"], |
45 |
env=self.env, default_mode=self.settings['compression_mode'], |
46 |
comp_prog=self.settings["comp_prog"]) |
47 |
@@ -93,9 +94,9 @@ class snapshot(TargetBase, GenBase): |
48 |
def kill_chroot_pids(self): |
49 |
pass |
50 |
|
51 |
- @staticmethod |
52 |
- def cleanup(): |
53 |
+ def cleanup(self): |
54 |
log.info('Cleaning up ...') |
55 |
+ self.purge() |
56 |
|
57 |
def purge(self): |
58 |
clear_dir(self.settings['tmp_path']) |
59 |
-- |
60 |
2.12.0 |
61 |
|
62 |
|
63 |
|
64 |
-- |
65 |
Brian Dolbec <dolsen> |