1 |
commit: fddd40039ce4d608dfc793a1ef8a60ca40413dc4 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 10 05:11:44 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 10 23:54:36 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fddd4003 |
7 |
|
8 |
stage2: convert to log module |
9 |
|
10 |
catalyst/targets/stage2.py | 17 ++++++++++------- |
11 |
1 file changed, 10 insertions(+), 7 deletions(-) |
12 |
|
13 |
diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py |
14 |
index 786aaa4..ff060d2 100644 |
15 |
--- a/catalyst/targets/stage2.py |
16 |
+++ b/catalyst/targets/stage2.py |
17 |
@@ -5,6 +5,7 @@ stage2 target, builds upon previous stage1 tarball |
18 |
|
19 |
import os |
20 |
|
21 |
+from catalyst import log |
22 |
from catalyst.support import normpath |
23 |
from catalyst.base.stagebase import StageBase |
24 |
|
25 |
@@ -30,10 +31,12 @@ class stage2(StageBase): |
26 |
self.settings["hash_map"].generate_hash( |
27 |
self.settings["source_path"],\ |
28 |
hash_=self.settings["hash_function"]) |
29 |
- print "Source path set to "+self.settings["source_path"] |
30 |
+ log.notice('Source path set to %s', self.settings['source_path']) |
31 |
if os.path.isdir(self.settings["source_path"]): |
32 |
- print "\tIf this is not desired, remove this directory or turn off seedcache in the options of catalyst.conf" |
33 |
- print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"] + "\n") |
34 |
+ log.warning( |
35 |
+ 'If this is not desired, remove this directory or turn off seedcache in the\n' |
36 |
+ 'options of catalyst.conf. The source path will then be:\n%s', |
37 |
+ normpath(self.settings['storedir'] + '/builds/' + self.settings['source_subpath'])) |
38 |
|
39 |
# XXX: How do these override_foo() functions differ from the ones in |
40 |
# StageBase and why aren't they in stage3_target? |
41 |
@@ -57,7 +60,7 @@ class stage2(StageBase): |
42 |
def set_portage_overlay(self): |
43 |
StageBase.set_portage_overlay(self) |
44 |
if "portage_overlay" in self.settings: |
45 |
- print "\nWARNING !!!!!" |
46 |
- print "\tUsing an portage overlay for earlier stages could cause build issues." |
47 |
- print "\tIf you break it, you buy it. Don't complain to us about it." |
48 |
- print "\tDont say we did not warn you\n" |
49 |
+ log.warning( |
50 |
+ 'Using an overlay for earlier stages could cause build issues.\n' |
51 |
+ "If you break it, you buy it. Don't complain to us about it.\n" |
52 |
+ "Don't say we did not warn you.") |