Replace more instances of print with msg()
authorAndrew Gaffney <agaffney@gentoo.org>
Mon, 12 Jan 2009 15:46:40 +0000 (09:46 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Mon, 12 Jan 2009 15:46:40 +0000 (09:46 -0600)
15 files changed:
ChangeLog
modules/catalyst/config.py
modules/catalyst/error.py
modules/catalyst/hash.py
modules/catalyst/output.py
modules/catalyst/spawn.py
modules/catalyst/target/embedded.py
modules/catalyst/target/grp.py
modules/catalyst/target/livecd_stage1.py
modules/catalyst/target/livecd_stage2.py
modules/catalyst/target/netboot.py
modules/catalyst/target/snapshot.py
modules/catalyst/target/stage1.py
modules/catalyst/target/stage2.py
modules/catalyst/target/stage3.py

index df9fce247a4d888ca699676ba77c7c1e8cf7233b..a14cf88b51afb2c6c2b15de6763854b2cabd79e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,17 @@
 # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
 # Distributed under the GPL v2
 
+  12 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+  modules/catalyst/config.py, modules/catalyst/error.py,
+  modules/catalyst/hash.py, modules/catalyst/output.py,
+  modules/catalyst/spawn.py, modules/catalyst/target/embedded.py,
+  modules/catalyst/target/grp.py, modules/catalyst/target/livecd_stage1.py,
+  modules/catalyst/target/livecd_stage2.py,
+  modules/catalyst/target/netboot.py, modules/catalyst/target/snapshot.py,
+  modules/catalyst/target/stage1.py, modules/catalyst/target/stage2.py,
+  modules/catalyst/target/stage3.py:
+  Replace more instances of print with msg()
+
   12 Jan 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst,
   modules/catalyst/output.py, modules/catalyst/util.py:
   More replacements of the print statement with msg()
index 53c2b920e35752d758c1b8f9a40492a487c4462f..4fc62911bf7585d2b639f0878b5ecb80623661cf 100644 (file)
@@ -1,5 +1,6 @@
 import re
 from catalyst.error import *
+from catalyst.output import *
 
 required_config_file_values=["storedir","sharedir","distdir","portdir"]
 valid_config_file_values=required_config_file_values[:]
@@ -119,7 +120,7 @@ class ParserBase:
                        for x in values.keys():
                                # Delete empty key pairs
                                if not values[x]:
-                                       print "\n\tWARNING: No value set for key " + x + "...deleting"
+                                       msg("\n\tWARNING: No value set for key " + x + "...deleting")
                                        del values[x]
 
                self.values = values
index 66ab3e0c5e31c252569d41815ad8011f0aeb4fff..ef028615ff317ea61e1275db883cd2c6fea5d6dd 100644 (file)
@@ -3,18 +3,18 @@ This module contains the custom exception classes used by catalyst
 """
 
 import sys, traceback
-import catalyst.output
+from catalyst.output import *
 
 class CatalystError(Exception):
        def __init__(self, message):
                if message:
                        (extype,value)=sys.exc_info()[:2]
                        if value!=None:
-                               print
-                               print traceback.print_exc(file=sys.stdout)
-                       print
-                       catalyst.output.warn(message)
-                       print
+                               msg()
+                               msg(traceback.print_exc(file=sys.stdout))
+                       msg()
+                       warn(message)
+                       msg()
 
 class LockInUse(Exception):
        def __init__(self, message):
@@ -23,7 +23,7 @@ class LockInUse(Exception):
                        #if value!=None:
                            #print
                            #kprint traceback.print_exc(file=sys.stdout)
-                       print
-                       catalyst.output.warn("lock file in use: " + message)
-                       print
+                       msg()
+                       warn("lock file in use: " + message)
+                       msg()
 
index 5a8b879a2697176e4ab9890c480330df20915d2c..43ee89ed7d1154983c19d370c8754475017717fa 100644 (file)
@@ -4,7 +4,7 @@ This module contains functions for generating the CONTENTS and hash files
 
 import os
 from catalyst.error import *
-from catalyst.output import warn
+from catalyst.output import *
 
 def gen_contents_file(file, settings):
        if os.path.exists(file+".CONTENTS"):
@@ -80,7 +80,7 @@ def calc_contents(file, cmd, verbose):
        result = "".join(a.readlines())
        a.close()
        if verbose:
-               print result
+               msg(result)
        return result
 
 # This has map must be defined after the function calc_content
@@ -111,7 +111,7 @@ def calc_hash(file, cmd, cmd_args, id_string="MD5", verbose=False):
        result = a.readline().split()[0]
        a.close()
        if verbose:
-               print "%s (%s) = %s" % (id_string, file, result)
+               msg("%s (%s) = %s" % (id_string, file, result))
        return result
 
 def calc_hash2(file, cmd, cmd_args, id_string="MD5", verbose=False):
@@ -123,7 +123,7 @@ def calc_hash2(file, cmd, cmd_args, id_string="MD5", verbose=False):
        short_file = os.path.split(myline[1])[1]
        result = header + tmphash + "  " + short_file + "\n"
        if verbose:
-               print "%s (%s) = %s" % (header, short_file, result)
+               msg("%s (%s) = %s" % (header, short_file, result))
        return result
 
 # This has map must be defined after the function calc_hash
index ec6adb7a8e578c1bdf94cd5cb053780631dc9e1a..7d6e802c767573350e9c69fb06ab2179fab2b963 100644 (file)
@@ -6,17 +6,17 @@ import sys
 
 verbosity = 1
 
-def msg(mymsg, verblevel=1, newline=True):
+def msg(mymsg="", verblevel=1, newline=True):
        if verbosity >= verblevel:
                if newline:
                        print mymsg
                else:
                        print mymsg,
 
-def warn(msg):
-       print "!!! catalyst: " + msg
+def warn(message):
+       msg("!!! catalyst: " + message)
 
-def die(msg, exitcode=1):
-       warn(msg)
+def die(message, exitcode=1):
+       warn(message)
        sys.exit(exitcode)
 
index c173468227dc0e3e910bbae642d9e472fabdc592..cfd1c0379901e3e28f42b98235627486de31eaa1 100644 (file)
@@ -5,6 +5,7 @@ This module contains all the functions related to spawning external commands
 import sys, os, types, signal
 import catalyst.util
 from catalyst.error import *
+from catalyst.output import *
 
 BASH_BINARY = "/bin/bash"
 
@@ -243,7 +244,7 @@ def spawn(mycommand,env={},raw_exit_code=False,opt_name=None,fd_pipes=None,retur
                         os.umask(022)
 
                 try:
-                        #print "execing", myc, myargs
+                        #msg("execing", myc, myargs)
                         if func_call:
                                 # either use a passed in func for interpretting the results, or return if no exception.
                                 # note the passed in list, and dict are expanded.
@@ -252,7 +253,7 @@ def spawn(mycommand,env={},raw_exit_code=False,opt_name=None,fd_pipes=None,retur
                                 try:
                                         mycommand[0](*mycommand[1],**mycommand[2])
                                 except Exception,e:
-                                        print "caught exception",e," in forked func",mycommand[0]
+                                        msg("caught exception",e," in forked func",mycommand[0])
                                 sys.exit(0)
 
                        #os.execvp(myc,myargs)
@@ -262,7 +263,7 @@ def spawn(mycommand,env={},raw_exit_code=False,opt_name=None,fd_pipes=None,retur
                 except Exception, e:
                         if not func_call:
                                 raise str(e)+":\n   "+myc+" "+"".join(myargs)
-                        print "func call failed"
+                        msg("func call failed")
 
                 # If the execve fails, we need to report it, and exit
                 # *carefully* --- report error here
index fbc8e8cf78c74cde9b84489e56247b42cbddbf2d..68edf761b30b15d4ec68b8ce7ba25df860a0ada0 100644 (file)
@@ -11,6 +11,7 @@ ROOT=/tmp/submerge emerge --blahblah foo bar
 
 from generic_stage import *
 import catalyst.util
+from catalyst.output import *
 
 class embedded_target(generic_stage_target):
 
@@ -35,10 +36,10 @@ class embedded_target(generic_stage_target):
 
        def set_stage_path(self):
                self.settings["stage_path"]=catalyst.util.normpath(self.settings["chroot_path"]+"/tmp/mergeroot")
-               print "embedded stage path is "+self.settings["stage_path"]
+               msg("embedded stage path is " + self.settings["stage_path"])
 
        def set_root_path(self):
                self.settings["root_path"]=catalyst.util.normpath("/tmp/mergeroot")
-               print "embedded root path is "+self.settings["root_path"]
+               msg("embedded root path is " + self.settings["root_path"])
 
 __target_map = {"embedded":embedded_target}
index 263ce39f4d845342f48847bde83e600105b22b2e..931db9f8bab341b20081907e1e2b5e99825ab796 100644 (file)
@@ -8,6 +8,7 @@ from generic_stage import *
 import catalyst
 from catalyst.error import *
 from catalyst.spawn import cmd
+from catalyst.output import *
 
 class grp_target(generic_stage_target):
        def __init__(self,spec,addlargs):
@@ -36,7 +37,7 @@ class grp_target(generic_stage_target):
        def set_target_path(self):
                self.settings["target_path"]=catalyst.util.normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
                if self.check_autoresume("setup_target_path"):
-                       print "Resume point detected, skipping target path setup operation..."
+                       msg("Resume point detected, skipping target path setup operation...")
                else:
                        # first clean up any existing target stuff
                        #if os.path.isdir(self.settings["target_path"]):
@@ -74,7 +75,7 @@ class grp_target(generic_stage_target):
                for pkgset in self.settings["grp"]:
                        if self.settings["grp/"+pkgset+"/type"] == "pkgset":
                                destdir=catalyst.util.normpath(self.settings["target_path"]+"/"+pkgset+"/All")
-                               print "Digesting files in the pkgset....."
+                               msg("Digesting files in the pkgset.....")
                                digests=glob.glob(destdir+'/*.DIGESTS')
                                for i in digests:
                                        if os.path.exists(i):
@@ -89,7 +90,7 @@ class grp_target(generic_stage_target):
                                                catalyst.hash.gen_digest_file(catalyst.util.normpath(destdir+"/"+i), self.settings)
                        else:
                                destdir=catalyst.util.normpath(self.settings["target_path"]+"/"+pkgset)
-                               print "Digesting files in the srcset....."
+                               msg("Digesting files in the srcset.....")
 
                                digests=glob.glob(destdir+'/*.DIGESTS')
                                for i in digests:
index a01622810b3415de9bde2d3a4ea3c12d5f83d9a6..841fb642929eec3a58abb67a3cbde1a90f3ac1fe 100644 (file)
@@ -6,6 +6,7 @@ Builder class for LiveCD stage1.
 from generic_stage import *
 import catalyst.util
 from catalyst.spawn import cmd
+from catalyst.output import *
 
 class livecd_stage1_target(generic_stage_target):
        def __init__(self,spec,addlargs):
@@ -24,7 +25,7 @@ class livecd_stage1_target(generic_stage_target):
        def set_target_path(self):
                self.settings["target_path"]=catalyst.util.normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"])
                if self.check_autoresume("setup_target_path"):
-                               print "Resume point detected, skipping target path setup operation..."
+                               msg("Resume point detected, skipping target path setup operation...")
                else:
                        # first clean up any existing target stuff
                        if os.path.exists(self.settings["target_path"]):
index f9cad328d59db3cb11d6841e5aa99eee5a9ccd2d..bd8931db55c80a343f0153f7efc8905c072fba12 100644 (file)
@@ -8,6 +8,7 @@ from generic_stage import *
 import catalyst
 from catalyst.error import *
 from catalyst.spawn import cmd
+from catalyst.output import *
 
 class livecd_stage2_target(generic_stage_target):
        def __init__(self,spec,addlargs):
@@ -46,7 +47,7 @@ class livecd_stage2_target(generic_stage_target):
        def set_target_path(self):
                self.settings["target_path"]=catalyst.util.normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
                if self.check_autoresume("setup_target_path"):
-                               print "Resume point detected, skipping target path setup operation..."
+                               msg("Resume point detected, skipping target path setup operation...")
                else:
                        # first clean up any existing target stuff
                        if os.path.isdir(self.settings["target_path"]):
@@ -86,7 +87,7 @@ class livecd_stage2_target(generic_stage_target):
                if self.check_autoresume():
                        if os.path.isdir(self.settings["source_path"]) and \
                                self.check_autoresume("unpack"):
-                               print "Resume point detected, skipping unpack operation..."
+                               msg("Resume point detected, skipping unpack operation...")
                                unpack=False
                        elif "source_path_hash" in self.settings:
                                if self.settings["source_path_hash"] != clst_unpack_hash:
@@ -95,7 +96,7 @@ class livecd_stage2_target(generic_stage_target):
                if unpack:
                        self.mount_safety_check()
                        if invalid_snapshot:
-                               print "No Valid Resume point detected, cleaning up  ..."
+                               msg("No Valid Resume point detected, cleaning up...")
                                #os.remove(self.settings["autoresume_path"]+"dir_setup")
                                self.clear_autoresume()
                                self.clear_chroot()
@@ -114,7 +115,7 @@ class livecd_stage2_target(generic_stage_target):
                        if not display_msg:
                                raise CatalystError,"Could not find appropriate source. Please check the 'source_subpath' setting in the spec file."
 
-                       print display_msg
+                       msg(display_msg)
                        cmd(unpack_cmd,error_msg,env=self.env)
 
                        if "source_path_hash" in self.settings:
index 140a624905e86cc707bdd12fee64cb78eab05b61..ebfccc437cf521cb04e98527f33ed6c1c4cfb354 100644 (file)
@@ -8,6 +8,7 @@ from generic_stage import *
 import catalyst.util
 from catalyst.error import *
 from catalyst.spawn import cmd
+from catalyst.output import *
 
 class netboot_target(generic_stage_target):
        def __init__(self,spec,addlargs):
@@ -45,7 +46,7 @@ class netboot_target(generic_stage_target):
                self.settings["target_path"]=catalyst.util.normpath(self.settings["storedir"]+"/builds/"+\
                        self.settings["target_subpath"]+"/")
                if self.check_autoresume("setup_target_path"):
-                               print "Resume point detected, skipping target path setup operation..."
+                               msg("Resume point detected, skipping target path setup operation...")
                else:
                        # first clean up any existing target stuff
                        if os.path.isfile(self.settings["target_path"]):
@@ -62,7 +63,7 @@ class netboot_target(generic_stage_target):
 
                # check for autoresume point
                if self.check_autoresume("copy_files_to_image"):
-                               print "Resume point detected, skipping target path setup operation..."
+                               msg("Resume point detected, skipping target path setup operation...")
                else:
                        if "netboot/packages" in self.settings:
                                if type(self.settings["netboot/packages"]) == types.StringType:
@@ -94,7 +95,7 @@ class netboot_target(generic_stage_target):
 
        def setup_overlay(self):
                if self.check_autoresume("setup_overlay"):
-                       print "Resume point detected, skipping setup_overlay operation..."
+                       msg("Resume point detected, skipping setup_overlay operation...")
                else:
                        if "netboot/overlay" in self.settings:
                                for x in self.settings["netboot/overlay"]:
@@ -110,25 +111,25 @@ class netboot_target(generic_stage_target):
                try:
                        cmd("/bin/bash "+self.settings["controller_file"]+\
                                " final",env=self.env)
-                       print ">>> Netboot Build Finished!"
+                       msg(">>> Netboot Build Finished!")
                except CatalystError:
                        self.unbind()
                        raise CatalystError,"Failed to move kernel images!"
 
        def remove(self):
                if self.check_autoresume("remove"):
-                       print "Resume point detected, skipping remove operation..."
+                       msg("Resume point detected, skipping remove operation...")
                else:
                        if self.settings["spec_prefix"]+"/rm" in self.settings:
                                for x in self.settings[self.settings["spec_prefix"]+"/rm"]:
                                        # we're going to shell out for all these cleaning operations,
                                        # so we get easy glob handling
-                                       print "netboot: removing " + x
+                                       msg("netboot: removing " + x)
                                        os.system("rm -rf " + self.settings["chroot_path"] + self.settings["merge_path"] + x)
 
        def empty(self):
                if self.check_autoresume("empty"):
-                       print "Resume point detected, skipping empty operation..."
+                       msg("Resume point detected, skipping empty operation...")
                else:
                        if "netboot/empty" in self.settings:
                                if type(self.settings["netboot/empty"])==types.StringType:
@@ -136,9 +137,9 @@ class netboot_target(generic_stage_target):
                                for x in self.settings["netboot/empty"]:
                                        myemp=self.settings["chroot_path"] + self.settings["merge_path"] + x
                                        if not os.path.isdir(myemp):
-                                               print x,"not a directory or does not exist, skipping 'empty' operation."
+                                               msg(x + " not a directory or does not exist, skipping 'empty' operation.")
                                                continue
-                                       print "Emptying directory", x
+                                       msg("Emptying directory " + x)
                                        # stat the dir, delete the dir, recreate the dir and set
                                        # the proper perms and ownership
                                        mystat=os.stat(myemp)
index 1d7d3a0952f595fe0541f2f6fb3be0429dabafb2..e88ad8cab3c23f2826cb61fba05ea99a1957c585 100644 (file)
@@ -7,6 +7,7 @@ import os
 from generic_stage import *
 import catalyst
 from catalyst.spawn import cmd
+from catalyst.output import *
 
 class snapshot_target(generic_target):
        def __init__(self,myspec,addlargs):
@@ -38,8 +39,8 @@ class snapshot_target(generic_target):
                        self.purge()
 
                self.setup()
-               print "Creating Portage tree snapshot "+self.settings["version_stamp"]+\
-                       " from "+self.settings["portdir"]+"..."
+               msg("Creating Portage tree snapshot " + self.settings["version_stamp"] + \
+                       " from " + self.settings["portdir"] + "...")
 
                mytmp=self.settings["tmp_path"]
                if not os.path.exists(mytmp):
@@ -48,7 +49,7 @@ class snapshot_target(generic_target):
                cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ --exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* "+\
                        self.settings["portdir"]+"/ "+mytmp+"/portage/","Snapshot failure",env=self.env)
 
-               print "Compressing Portage snapshot tarball..."
+               msg("Compressing Portage snapshot tarball...")
                cmd("tar cjf "+self.settings["snapshot_path"]+" -C "+mytmp+" portage",\
                        "Snapshot creation failure",env=self.env)
 
@@ -56,18 +57,18 @@ class snapshot_target(generic_target):
                catalyst.hash.gen_digest_file(self.settings["snapshot_path"], self.settings)
 
                self.cleanup()
-               print "snapshot: complete!"
+               msg("snapshot: complete!")
 
        def kill_chroot_pids(self):
                pass
 
        def cleanup(self):
-               print "Cleaning up..."
+               msg("Cleaning up...")
 
        def purge(self):
                myemp=self.settings["tmp_path"]
                if os.path.isdir(myemp):
-                       print "Emptying directory",myemp
+                       msg("Emptying directory " + myemp)
                        """
                        stat the dir, delete the dir, recreate the dir and set
                        the proper perms and ownership
index 1b8eddca40f4c48aadddbe92b7e2f2f4af471c27..c0b9fb0b84aaed7042fdce5a0f67c4cb06d85d46 100644 (file)
@@ -4,7 +4,8 @@ Builder class for a stage1 installation tarball build.
 """
 
 from generic_stage import *
-import catalyst.util
+import catalyst
+from catalyst.output import *
 
 class stage1_target(generic_stage_target):
        def __init__(self,spec,addlargs):
@@ -14,12 +15,12 @@ class stage1_target(generic_stage_target):
 
        def set_stage_path(self):
                self.settings["stage_path"]=catalyst.util.normpath(self.settings["chroot_path"]+self.settings["root_path"])
-               print "stage1 stage path is "+self.settings["stage_path"]
+               msg("stage1 stage path is " + self.settings["stage_path"])
 
        def set_root_path(self):
                # sets the root path, relative to 'chroot_path', of the stage1 root
                self.settings["root_path"]=catalyst.util.normpath("/tmp/stage1root")
-               print "stage1 root path is "+self.settings["root_path"]
+               msg("stage1 root path is " + self.settings["root_path"])
 
        def set_cleanables(self):
                generic_stage_target.set_cleanables(self)
@@ -52,10 +53,12 @@ class stage1_target(generic_stage_target):
        def set_portage_overlay(self):
                generic_stage_target.set_portage_overlay(self)
                if "portage_overlay" in self.settings:
-                       print "\nWARNING !!!!!"
-                       print "\tUsing an portage overlay for earlier stages could cause build issues."
-                       print "\tIf you break it, you buy it. Don't complain to us about it."
-                       print "\tDont say we did not warn you\n"
+                       msg()
+                       msg("WARNING !!!!!")
+                       msg("\tUsing an portage overlay for earlier stages could cause build issues.")
+                       msg("\tIf you break it, you buy it. Don't complain to us about it.")
+                       msg("\tDont say we did not warn you")
+                       msg()
 
        def base_dirs(self):
                if os.uname()[0] == "FreeBSD":
@@ -72,14 +75,14 @@ class stage1_target(generic_stage_target):
                                        proc_keepfile.write('')
                                        proc_keepfile.close()
                                except IOError:
-                                       print "!!! Failed to create %s" % (self.settings["stage_path"]+"/dev/.keep")
+                                       msg("!!! Failed to create %s" % (self.settings["stage_path"] + "/dev/.keep"))
                        if not os.path.isfile(self.settings["stage_path"]+"/dev/.keep"):
                                try:
                                        dev_keepfile = open(self.settings["stage_path"]+"/dev/.keep","w")
                                        dev_keepfile.write('')
                                        dev_keepfile.close()
                                except IOError:
-                                       print "!!! Failed to create %s" % (self.settings["stage_path"]+"/dev/.keep")
+                                       msg("!!! Failed to create %s" % (self.settings["stage_path"]+"/dev/.keep"))
                else:
                        pass
 
index b2f6507b8aed311fa4f12cce387ed0dfe76099af..68e8c8df58422c038d7ef186fcd0b2f2e936a62f 100644 (file)
@@ -5,6 +5,7 @@ Builder class for a stage2 installation tarball build.
 
 from generic_stage import *
 import catalyst
+from catalyst.output import *
 
 class stage2_target(generic_stage_target):
        def __init__(self,spec,addlargs):
@@ -22,10 +23,10 @@ class stage2_target(generic_stage_target):
                                # XXX: Is this even necessary if the previous check passes?
                                        self.settings["source_path_hash"]=catalyst.hash.generate_hash(self.settings["source_path"],\
                                                hash_function=self.settings["hash_function"],verbose=False)
-               print "Source path set to "+self.settings["source_path"]
+               msg("Source path set to " + self.settings["source_path"])
                if os.path.isdir(self.settings["source_path"]):
-                       print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf"
-                       print "\tthe source path will then be "+catalyst.util.normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n")
+                       msg("\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf")
+                       msg("\tthe source path will then be " + catalyst.util.normpath(self.settings["storedir"] + "/builds/" + self.settings["source_subpath"] + ".tar.bz2\n"))
 
        # XXX: How do these override_foo() functions differ from the ones in
        # generic_stage_target and why aren't they in stage3_target?
@@ -53,9 +54,11 @@ class stage2_target(generic_stage_target):
        def set_portage_overlay(self):
                        generic_stage_target.set_portage_overlay(self)
                        if "portage_overlay" in self.settings:
-                               print "\nWARNING !!!!!"
-                               print "\tUsing an portage overlay for earlier stages could cause build issues."
-                               print "\tIf you break it, you buy it. Don't complain to us about it."
-                               print "\tDont say we did not warn you\n"
+                               msg()
+                               msg("WARNING !!!!!")
+                               msg("\tUsing an portage overlay for earlier stages could cause build issues.")
+                               msg("\tIf you break it, you buy it. Don't complain to us about it.")
+                               msg("\tDont say we did not warn you")
+                               msg()
 
 __target_map = {"stage2":stage2_target}
index 543424069cd6e92ffeaa302f723e9b8b30925f81..6ae7e1002351beb55a77e94f1bc71928d1bd5538 100644 (file)
@@ -14,10 +14,12 @@ class stage3_target(generic_stage_target):
        def set_portage_overlay(self):
                generic_stage_target.set_portage_overlay(self)
                if "portage_overlay" in self.settings:
-                       print "\nWARNING !!!!!"
-                       print "\tUsing an overlay for earlier stages could cause build issues."
-                       print "\tIf you break it, you buy it. Don't complain to us about it."
-                       print "\tDont say we did not warn you\n"
+                       msg()
+                       msg("WARNING !!!!!")
+                       msg("\tUsing an overlay for earlier stages could cause build issues.")
+                       msg("\tIf you break it, you buy it. Don't complain to us about it.")
+                       msg("\tDont say we did not warn you")
+                       msg()
 
        def set_cleanables(self):
                generic_stage_target.set_cleanables(self)