* [gentoo-catalyst] [PATCH 5/7] targets/snapshot.py: Update the code and log messages to use the configured repo_name
@ 2017-03-10 19:23 Brian Dolbec
0 siblings, 0 replies; only message in thread
From: Brian Dolbec @ 2017-03-10 19:23 UTC (permalink / raw
To: gentoo-catalyst
From b5410d12852222fca19e01cfdcbb37e87b6f21ff Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Thu, 9 Mar 2017 01:17:07 -0800
Subject: [PATCH 5/7] targets/snapshot.py: Update the code and log messages to
use the configured repo_name
To: gentoo-catalyst@lists.gentoo.org
One more portage name seperation from being used to represent the ebuild repository.
---
catalyst/targets/snapshot.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 8a9acdd9..087834eb 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -22,7 +22,7 @@ class snapshot(TargetBase, GenBase):
TargetBase.__init__(self, myspec, addlargs)
GenBase.__init__(self,myspec)
#self.settings=myspec
- self.settings["target_subpath"]="portage"
+ self.settings["target_subpath"]="repos"
st=self.settings["storedir"]
self.settings["snapshot_path"] = normpath(st + "/snapshots/"
+ self.settings["snapshot_name"]
@@ -46,8 +46,9 @@ class snapshot(TargetBase, GenBase):
success = True
self.setup()
- log.notice('Creating Portage tree snapshot %s from %s ...',
- self.settings['version_stamp'], self.settings['portdir'])
+ log.notice('Creating %s tree snapshot %s from %s ...',
+ self.settings["repo_name"], self.settings['version_stamp'],
+ self.settings['portdir'])
mytmp=self.settings["tmp_path"]
ensure_dirs(mytmp)
@@ -63,7 +64,7 @@ class snapshot(TargetBase, GenBase):
mytmp + '/' + self.settings['repo_name'] + '/'],
env=self.env)
- log.notice('Compressing Portage snapshot tarball ...')
+ log.notice('Compressing %s snapshot tarball ...', self.settings["repo_name"])
compressor = CompressMap(self.settings["compress_definitions"],
env=self.env, default_mode=self.settings['compression_mode'],
comp_prog=self.settings["comp_prog"])
@@ -93,9 +94,9 @@ class snapshot(TargetBase, GenBase):
def kill_chroot_pids(self):
pass
- @staticmethod
- def cleanup():
+ def cleanup(self):
log.info('Cleaning up ...')
+ self.purge()
def purge(self):
clear_dir(self.settings['tmp_path'])
--
2.12.0
--
Brian Dolbec <dolsen>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-10 19:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 19:23 [gentoo-catalyst] [PATCH 5/7] targets/snapshot.py: Update the code and log messages to use the configured repo_name Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox