From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.77)
	(envelope-from <gentoo-commits+bounces-482728-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1SmUCk-00062a-9e
	for garchives@archives.gentoo.org; Wed, 04 Jul 2012 18:21:34 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 498DEE0676;
	Wed,  4 Jul 2012 18:21:12 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 09F86E0676
	for <gentoo-commits@lists.gentoo.org>; Wed,  4 Jul 2012 18:21:11 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6877B1B406A
	for <gentoo-commits@lists.gentoo.org>; Wed,  4 Jul 2012 18:21:10 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 2EC83E543D
	for <gentoo-commits@lists.gentoo.org>; Wed,  4 Jul 2012 18:21:09 +0000 (UTC)
From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" <dywi@mailerd.de>
Message-ID: <1341425470.2f210f30d60427f636e477890bd0091444fafe18.dywi@gentoo>
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/
X-VCS-Repository: proj/R_overlay
X-VCS-Files: roverlay/argutil.py
X-VCS-Directories: roverlay/
X-VCS-Committer: dywi
X-VCS-Committer-Name: André Erdmann
X-VCS-Revision: 2f210f30d60427f636e477890bd0091444fafe18
X-VCS-Branch: master
Date: Wed,  4 Jul 2012 18:21:09 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 3e16af69-4da2-4dea-ad3b-153ab6a4d0cc
X-Archives-Hash: ca97496f36b3f3c6f54e55c7f59bf923

commit:     2f210f30d60427f636e477890bd0091444fafe18
Author:     Andr=C3=A9 Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul  4 18:11:10 2012 +0000
Commit:     Andr=C3=A9 Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul  4 18:11:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/R_overlay.git=
;a=3Dcommit;h=3D2f210f30

argutil: --stats, --no-stats

---
 roverlay/argutil.py |   40 +++++++++++++++++++++++++++++-----------
 1 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/roverlay/argutil.py b/roverlay/argutil.py
index d1640ac..8e37694 100644
--- a/roverlay/argutil.py
+++ b/roverlay/argutil.py
@@ -89,7 +89,6 @@ def get_parser ( CMD_DESC, DEFAULT_CONFIG ):
 		**fs_file
 	)
=20
-
 	arg (
 		'--distdir', '--from', default=3Dargparse.SUPPRESS,
 		action=3D'append',
@@ -99,6 +98,7 @@ def get_parser ( CMD_DESC, DEFAULT_CONFIG ):
 			ebuilds.
 		''',
 		metavar=3D"<DISTDIR>",
+		dest=3D'distdirs',
 		type=3Dis_fs_dir
 	)
=20
@@ -113,37 +113,52 @@ def get_parser ( CMD_DESC, DEFAULT_CONFIG ):
 	)
=20
 	arg (
-		'--show',
+		'--show-overlay', '--show',
 		help=3D"print ebuilds and metadata to console",
 		**opt_in
 	)
=20
 	arg (
-		'--write',
+		'--write-overlay', '--write',
 		help=3D"write overlay to filesystem",
-		# !! change to opt_out (FIXME)
+		# !! change to opt_out in future (FIXME)
 		**opt_in
 	)
=20
+	# FIXME: swap --stats with --no-stats? (=3D> print stats by default)
+	arg (
+		'--stats',
+		help=3D"print some stats",
+		**opt_in
+	)
+
+	arg (
+		'--no-stats',
+		help=3D"don't print stats",
+		dest=3D"stats",
+		**opt_out
+	)
=20
 	arg (
 		'--nosync', '--no-sync',
-		help=3D"disable syncing with remotes (offline mode). TODO",
+		help=3D"disable syncing with remotes (offline mode).",
 		**opt_in
 	)
+
 	arg (
 		'--force-distroot',
-		help=3D"always use <DISTROOT>/<repo name> as repo distdir. TODO.",
+		help=3D"always use <DISTROOT>/<repo name> as repo distdir.",
 		**opt_in
 	)
=20
+	# TODO
 	arg (
 		'--debug',
 		help=3D'''
 			Turn on debugging. This produces a lot of messages.
 			(TODO: always on).
 		''',
-		**opt_out
+		**opt_in
 	)
=20
 	return parser
@@ -181,9 +196,10 @@ def parse_argv ( *args, **kw ):
 	conf  =3D dict()
 	extra =3D dict (
 		nosync         =3D p.nosync,
-		show           =3D p.show,
-		write          =3D p.write,
 		debug          =3D p.debug,
+		show_overlay   =3D p.show_overlay,
+		write_overlay  =3D p.write_overlay,
+		print_stats    =3D p.stats,
 		force_distroot =3D p.force_distroot,
 	)
=20
@@ -196,9 +212,11 @@ def parse_argv ( *args, **kw ):
 	if given ( 'distroot' ):
 		doconf ( p.distroot, 'distfiles.root' )
=20
-	if given ( 'distdir' ):
+	if given ( 'distdirs' ):
 		doconf ( (), 'REPO.config_files' )
-		extra ['distdir'] =3D p.distdir
+		extra ['distdirs'] =3D frozenset ( p.distdirs )
+		# FIXME:
+		# distdir implies --nosync, but LocalRepo doesn't care about that ( sy=
nc() is nosync() )
=20
 	if given ( 'deprule_file' ):
 		doconf ( p.deprule_file, 'DEPRES.SIMPLE_RULES.files' )