public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/, gobs/pym/
Date: Fri, 27 Apr 2012 20:59:27 +0000 (UTC)	[thread overview]
Message-ID: <1335560328.cfa1e254447b719a2a3fc59d7ecd9c0e933feefb.zorry@gentoo> (raw)

commit:     cfa1e254447b719a2a3fc59d7ecd9c0e933feefb
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 27 20:58:48 2012 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Fri Apr 27 20:58:48 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=cfa1e254

Add logging sync.py

---
 gobs/bin/gobs_updatedb                     |   15 ++++++++-------
 gobs/bin/{gobs_updatedb => gobs_updatedb~} |   12 ++++++------
 gobs/pym/sync.py                           |   14 +++++++++++---
 3 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/gobs/bin/gobs_updatedb b/gobs/bin/gobs_updatedb
index 4fba322..babaf38 100755
--- a/gobs/bin/gobs_updatedb
+++ b/gobs/bin/gobs_updatedb
@@ -114,14 +114,15 @@ def main():
 	# Main
 	# Logging
 	logging.basicConfig(filename=gobs_settings_dict['gobs_logfile'], level=logging.INFO)
-	# Init settings for the default config
+	# Sync portage and profile/settings
 	git_pull
-	if sync_tree():
-		mysettings =  init_portage_settings()
-		init_arch = gobs_arch()
-		init_arch.update_arch_db()
-		# Update the cpv db
-		update_cpv_db(mysettings)
+	sync_tree()
+	# Init settings for the default config
+	mysettings =  init_portage_settings()
+	init_arch = gobs_arch()
+	init_arch.update_arch_db()
+	# Update the cpv db
+	update_cpv_db(mysettings)
 	CM.closeAllConnections()
 	
 if __name__ == "__main__":

diff --git a/gobs/bin/gobs_updatedb b/gobs/bin/gobs_updatedb~
similarity index 96%
copy from gobs/bin/gobs_updatedb
copy to gobs/bin/gobs_updatedb~
index 4fba322..4dce5ce 100755
--- a/gobs/bin/gobs_updatedb
+++ b/gobs/bin/gobs_updatedb~
@@ -116,12 +116,12 @@ def main():
 	logging.basicConfig(filename=gobs_settings_dict['gobs_logfile'], level=logging.INFO)
 	# Init settings for the default config
 	git_pull
-	if sync_tree():
-		mysettings =  init_portage_settings()
-		init_arch = gobs_arch()
-		init_arch.update_arch_db()
-		# Update the cpv db
-		update_cpv_db(mysettings)
+	sync_tree()
+	mysettings =  init_portage_settings()
+	init_arch = gobs_arch()
+	init_arch.update_arch_db()
+	# Update the cpv db
+	update_cpv_db(mysettings)
 	CM.closeAllConnections()
 	
 if __name__ == "__main__":

diff --git a/gobs/pym/sync.py b/gobs/pym/sync.py
index cfaebfe..22ff5e7 100644
--- a/gobs/pym/sync.py
+++ b/gobs/pym/sync.py
@@ -2,6 +2,8 @@ from __future__ import print_function
 import portage
 import os
 import errno
+import logging
+import sys
 from git import *
 from _emerge.actions import load_emerge_config, action_sync
 from _emerge.main import parse_opts
@@ -20,6 +22,12 @@ def sync_tree():
 	tmpcmdline.append("--sync")
 	tmpcmdline.append("--quiet")
 	myaction, myopts, myfiles = parse_opts(tmpcmdline)
-	fail_sync = action_sync(settings, trees, mtimedb, myopts, myaction)
-	print("fail_sync", fail_sync)
-	return fail_sync
\ No newline at end of file
+	logging.info("Eemerge --sync")
+	fail_sync = 1
+	#fail_sync = action_sync(settings, trees, mtimedb, myopts, myaction)
+	if fail_sync is True:
+		logging.warning("Emerge --sync fail!")
+		sys.exit()
+	else:
+		logging.info("Emerge --sync ... Done."
+	sys.exit()
\ No newline at end of file



             reply	other threads:[~2012-04-27 20:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27 20:59 Magnus Granberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-27 23:09 [gentoo-commits] dev/zorry:master commit in: gobs/bin/, gobs/pym/ Magnus Granberg
2012-12-23 17:09 Magnus Granberg
2012-12-22  2:59 Magnus Granberg
2012-12-21  1:44 Magnus Granberg
2012-12-19  2:11 Magnus Granberg
2012-12-07 14:07 Magnus Granberg
2012-12-05 23:56 Magnus Granberg
2012-11-29 22:22 Magnus Granberg
2012-07-17  0:07 Magnus Granberg
2012-06-26 22:10 Magnus Granberg
2012-05-13 17:59 Magnus Granberg
2012-05-09 23:12 Magnus Granberg
2012-05-06 10:41 Magnus Granberg
2012-05-04 22:32 Magnus Granberg
2012-05-01  1:12 Magnus Granberg
2012-04-30 12:08 Magnus Granberg
2012-04-29 14:43 Magnus Granberg
2012-04-29 13:16 Magnus Granberg
2012-04-29 13:13 Magnus Granberg
2012-04-28 16:01 Magnus Granberg
2012-04-27 22:22 Magnus Granberg
2011-11-01 21:14 Magnus Granberg
2011-10-29  0:14 Magnus Granberg
2011-09-28 10:53 Magnus Granberg
2011-09-28  0:33 Magnus Granberg
2011-09-26 23:25 Magnus Granberg
2011-08-31  1:46 Magnus Granberg
2011-08-30 23:02 Magnus Granberg
2011-07-31 13:43 Magnus Granberg
2011-04-24 22:13 Magnus Granberg
2011-04-23 14:23 Magnus Granberg

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=1335560328.cfa1e254447b719a2a3fc59d7ecd9c0e933feefb.zorry@gentoo \
    --to=zorry@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