public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
Date: Sun, 11 Oct 2015 17:26:37 +0000 (UTC)	[thread overview]
Message-ID: <1444521276.e60ef20eb3ef4d64a9d7b24f4b1d2d36c026ff7c.vapier@gentoo> (raw)

commit:     e60ef20eb3ef4d64a9d7b24f4b1d2d36c026ff7c
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:11:40 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 23:54:36 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e60ef20e

stage1: convert to log module

 catalyst/targets/stage1.py | 38 ++++++++++++++++----------------------
 1 file changed, 16 insertions(+), 22 deletions(-)

diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index b5dfac7..18ef520 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -5,6 +5,9 @@ stage1 target
 
 import os
 
+from snakeoil import fileutils
+
+from catalyst import log
 from catalyst.support import normpath
 from catalyst.fileops import ensure_dirs
 from catalyst.base.stagebase import StageBase
@@ -22,12 +25,12 @@ class stage1(StageBase):
 
 	def set_stage_path(self):
 		self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
-		print "stage1 stage path is "+self.settings["stage_path"]
+		log.notice('stage1 stage path is %s', 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"]=normpath("/tmp/stage1root")
-		print "stage1 root path is "+self.settings["root_path"]
+		log.info('stage1 root path is %s', self.settings['root_path'])
 
 	def set_cleanables(self):
 		StageBase.set_cleanables(self)
@@ -55,10 +58,10 @@ class stage1(StageBase):
 	def set_portage_overlay(self):
 		StageBase.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"
+			log.warning(
+				'Using an overlay for earlier stages could cause build issues.\n'
+				"If you break it, you buy it.  Don't complain to us about it.\n"
+				"Don't say we did not warn you.")
 
 	def base_dirs(self):
 		if os.uname()[0] == "FreeBSD":
@@ -67,22 +70,13 @@ class stage1(StageBase):
 			# since proc and dev are not writeable, so...create them here
 			ensure_dirs(self.settings["stage_path"]+"/proc")
 			ensure_dirs(self.settings["stage_path"]+"/dev")
-			if not os.path.isfile(self.settings["stage_path"]+"/proc/.keep"):
-				try:
-					proc_keepfile = open(self.settings["stage_path"]+"/proc/.keep","w")
-					proc_keepfile.write('')
-					proc_keepfile.close()
-				except IOError:
-					print "!!! 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")
-		else:
-			pass
+			for f in ('/proc', '/dev'):
+				f = self.settings['stage_path'] + f + '/.keep'
+				if not os.path.isfile(f):
+					try:
+						fileutils.touch(f)
+					except IOError:
+						log.error('Failed to create %s', f)
 
 	def set_mounts(self):
 		# stage_path/proc probably doesn't exist yet, so create it


             reply	other threads:[~2015-10-11 17:26 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11 17:26 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-13 20:33 [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ Andreas K. Hüttel
2024-10-13 20:33 Andreas K. Hüttel
2024-08-03 11:01 Andreas K. Hüttel
2024-08-03  9:06 Andreas K. Hüttel
2024-07-30 15:29 Andreas K. Hüttel
2024-07-30 15:28 Andreas K. Hüttel
2024-07-30 14:54 Andreas K. Hüttel
2024-07-30 14:45 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2022-11-20  0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2022-04-02 23:50 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-02-21  2:05 Matt Turner
2021-01-18 19:53 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-12-27 23:15 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-24 22:07 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-24 22:07 Matt Turner
2020-10-23  4:36 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-24 22:07 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-06-05 21:13 Matt Turner
2020-06-05 21:13 Matt Turner
2020-05-20  3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-17 22:54 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-16  6:43 Matt Turner
2020-05-16  6:43 Matt Turner
2019-10-11 16:02 Ben Kohler
2019-07-01 15:35 Rick Farina
2018-10-01 16:30 Brian Dolbec
2018-07-21 18:54 Brian Dolbec
2018-04-05 18:21 Richard Farina
2018-01-04 19:09 Brian Dolbec
2017-12-18 16:57 Richard Farina
2017-11-29 17:20 Brian Dolbec
2016-03-21  5:09 Mike Frysinger
2015-12-23  4:30 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-11-12 16:24 Brian Dolbec
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-09 21:06 Mike Frysinger
2015-10-08 22:09 Mike Frysinger
2015-10-08  3:53 Mike Frysinger
2015-10-06 15:31 Mike Frysinger
2015-09-15 21:48 Richard Farina
2015-09-09 17:42 Brian Dolbec
2015-02-26 20:12 Brian Dolbec
2015-02-26 19:25 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26  4:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-05-05 19:17 Brian Dolbec
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec

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=1444521276.e60ef20eb3ef4d64a9d7b24f4b1d2d36c026ff7c.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@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