From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] [PATCH 05/10] clearbase: convert to log module
Date: Sun, 11 Oct 2015 02:29:07 -0400 [thread overview]
Message-ID: <1444544952-32408-5-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1444544952-32408-1-git-send-email-vapier@gentoo.org>
---
catalyst/base/clearbase.py | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index b2c1a11..3817196 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -1,5 +1,6 @@
+from catalyst import log
from catalyst.support import countdown
from catalyst.fileops import clear_dir
@@ -15,38 +16,38 @@ class ClearBase(object):
def clear_autoresume(self):
""" Clean resume points since they are no longer needed """
if "autoresume" in self.settings["options"]:
- print "Removing AutoResume Points: ..."
+ log.notice('Removing AutoResume Points ...')
self.resume.clear_all()
def remove_autoresume(self):
""" Rmove all resume points since they are no longer needed """
if "autoresume" in self.settings["options"]:
- print "Removing AutoResume: ..."
+ log.notice('Removing AutoResume ...')
self.resume.clear_all(remove=True)
def clear_chroot(self):
self.chroot_lock.unlock()
- print 'Clearing the chroot path ...'
+ log.notice('Clearing the chroot path ...')
clear_dir(self.settings["chroot_path"], 0755, True)
def remove_chroot(self):
self.chroot_lock.unlock()
- print 'Removing the chroot path ...'
+ log.notice('Removing the chroot path ...')
clear_dir(self.settings["chroot_path"], 0755, True, remove=True)
def clear_packages(self, remove=False):
if "pkgcache" in self.settings["options"]:
- print "purging the pkgcache ..."
+ log.notice('purging the pkgcache ...')
clear_dir(self.settings["pkgcache_path"], remove=remove)
def clear_kerncache(self, remove=False):
if "kerncache" in self.settings["options"]:
- print "purging the kerncache ..."
+ log.notice('purging the kerncache ...')
clear_dir(self.settings["kerncache_path"], remove=remove)
@@ -54,15 +55,15 @@ class ClearBase(object):
countdown(10,"Purging Caches ...")
if any(k in self.settings["options"] for k in ("purge",
"purgeonly", "purgetmponly")):
- print "purge(); clearing autoresume ..."
+ log.notice('purge(); clearing autoresume ...')
self.clear_autoresume()
- print "purge(); clearing chroot ..."
+ log.notice('purge(); clearing chroot ...')
self.clear_chroot()
if "purgetmponly" not in self.settings["options"]:
- print "purge(); clearing package cache ..."
+ log.notice('purge(); clearing package cache ...')
self.clear_packages(remove)
- print "purge(); clearing kerncache ..."
+ log.notice('purge(); clearing kerncache ...')
self.clear_kerncache(remove)
--
2.5.2
next prev parent reply other threads:[~2015-10-11 6:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-11 6:29 [gentoo-catalyst] [PATCH 01/10] stage1: convert to log module Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 02/10] stage2: " Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 03/10] stage3: " Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 04/10] stagebase: " Mike Frysinger
2015-10-11 6:29 ` Mike Frysinger [this message]
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 06/10] support: " Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 07/10] livecd_stage: " Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 08/10] netboot: " Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 09/10] embedded/grp: " Mike Frysinger
2015-10-11 6:29 ` [gentoo-catalyst] [PATCH 10/10] resume: " Mike Frysinger
2015-10-11 14:16 ` Anthony G. Basile
2015-10-11 17:38 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444544952-32408-5-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox