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.60)
	(envelope-from <gentoo-commits+bounces-371179-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Qrppk-00051w-UJ
	for garchives@archives.gentoo.org; Fri, 12 Aug 2011 11:23:25 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 50B1121C0F5;
	Fri, 12 Aug 2011 11:23:17 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 1E23421C0F5
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Aug 2011 11:23:17 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 85CCE1B406F
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Aug 2011 11:23:16 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id A465180040
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Aug 2011 11:23:15 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <c114ae3f89f41a05b3b695be7984b8300bd3c68b.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/repoman
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: c114ae3f89f41a05b3b695be7984b8300bd3c68b
Date: Fri, 12 Aug 2011 11:23:15 +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: 
X-Archives-Hash: b1661665d99f6d671144cf772c2b9920

commit:     c114ae3f89f41a05b3b695be7984b8300bd3c68b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 12 11:21:53 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Aug 12 11:21:53 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3Dc114ae3f

repoman: warn when --if-modified finds nothing

---
 bin/repoman |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index e806b31..91704ca 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1060,6 +1060,11 @@ except FileNotFound:
 	# disable for non-gentoo repoman users who may not have herds.
 	herd_base =3D None
=20
+modified_pkgs =3D 0
+if options.if_modified =3D=3D "y" and not vcs:
+	logging.info("Not in a version controlled repository; disabling --if-mo=
dified.")
+	options.if_modified =3D "n"
+
 for x in scanlist:
 	#ebuilds and digests added to cvs respectively.
 	logging.info("checking package %s" % x)
@@ -1073,12 +1078,13 @@ for x in scanlist:
 		checkdir_relative =3D os.path.join(catdir, checkdir_relative)
 	checkdir_relative =3D os.path.join(".", checkdir_relative)
=20
-	if vcs and options.if_modified =3D=3D "y":
+	if options.if_modified =3D=3D "y":
 		checkdir_modified =3D False
 		checkdir_pattern =3D checkdir_relative.rstrip(os.sep) + os.sep
 		for f in chain(mychanged, mynew):
 			if f.startswith(checkdir_pattern):
 				checkdir_modified =3D True
+				modified_pkgs +=3D 1
 				break
 		if not checkdir_modified:
 			continue
@@ -2000,6 +2006,9 @@ for x in scanlist:
 				"%s/metadata.xml: unused local USE-description: '%s'" % \
 				(x, myflag))
=20
+if options.if_modified =3D=3D "y" and modified_pkgs < 1:
+	logging.warn("--if-modified is enabled, but no modified packages were f=
ound!")
+
 if options.mode =3D=3D "manifest":
 	sys.exit(dofail)
=20