1 |
--- |
2 |
catalyst/base/clearbase.py | 21 +++++++++++---------- |
3 |
1 file changed, 11 insertions(+), 10 deletions(-) |
4 |
|
5 |
diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py |
6 |
index b2c1a11..3817196 100644 |
7 |
--- a/catalyst/base/clearbase.py |
8 |
+++ b/catalyst/base/clearbase.py |
9 |
@@ -1,5 +1,6 @@ |
10 |
|
11 |
|
12 |
+from catalyst import log |
13 |
from catalyst.support import countdown |
14 |
from catalyst.fileops import clear_dir |
15 |
|
16 |
@@ -15,38 +16,38 @@ class ClearBase(object): |
17 |
def clear_autoresume(self): |
18 |
""" Clean resume points since they are no longer needed """ |
19 |
if "autoresume" in self.settings["options"]: |
20 |
- print "Removing AutoResume Points: ..." |
21 |
+ log.notice('Removing AutoResume Points ...') |
22 |
self.resume.clear_all() |
23 |
|
24 |
|
25 |
def remove_autoresume(self): |
26 |
""" Rmove all resume points since they are no longer needed """ |
27 |
if "autoresume" in self.settings["options"]: |
28 |
- print "Removing AutoResume: ..." |
29 |
+ log.notice('Removing AutoResume ...') |
30 |
self.resume.clear_all(remove=True) |
31 |
|
32 |
|
33 |
def clear_chroot(self): |
34 |
self.chroot_lock.unlock() |
35 |
- print 'Clearing the chroot path ...' |
36 |
+ log.notice('Clearing the chroot path ...') |
37 |
clear_dir(self.settings["chroot_path"], 0755, True) |
38 |
|
39 |
|
40 |
def remove_chroot(self): |
41 |
self.chroot_lock.unlock() |
42 |
- print 'Removing the chroot path ...' |
43 |
+ log.notice('Removing the chroot path ...') |
44 |
clear_dir(self.settings["chroot_path"], 0755, True, remove=True) |
45 |
|
46 |
|
47 |
def clear_packages(self, remove=False): |
48 |
if "pkgcache" in self.settings["options"]: |
49 |
- print "purging the pkgcache ..." |
50 |
+ log.notice('purging the pkgcache ...') |
51 |
clear_dir(self.settings["pkgcache_path"], remove=remove) |
52 |
|
53 |
|
54 |
def clear_kerncache(self, remove=False): |
55 |
if "kerncache" in self.settings["options"]: |
56 |
- print "purging the kerncache ..." |
57 |
+ log.notice('purging the kerncache ...') |
58 |
clear_dir(self.settings["kerncache_path"], remove=remove) |
59 |
|
60 |
|
61 |
@@ -54,15 +55,15 @@ class ClearBase(object): |
62 |
countdown(10,"Purging Caches ...") |
63 |
if any(k in self.settings["options"] for k in ("purge", |
64 |
"purgeonly", "purgetmponly")): |
65 |
- print "purge(); clearing autoresume ..." |
66 |
+ log.notice('purge(); clearing autoresume ...') |
67 |
self.clear_autoresume() |
68 |
|
69 |
- print "purge(); clearing chroot ..." |
70 |
+ log.notice('purge(); clearing chroot ...') |
71 |
self.clear_chroot() |
72 |
|
73 |
if "purgetmponly" not in self.settings["options"]: |
74 |
- print "purge(); clearing package cache ..." |
75 |
+ log.notice('purge(); clearing package cache ...') |
76 |
self.clear_packages(remove) |
77 |
|
78 |
- print "purge(); clearing kerncache ..." |
79 |
+ log.notice('purge(); clearing kerncache ...') |
80 |
self.clear_kerncache(remove) |
81 |
-- |
82 |
2.5.2 |