summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-08-12 04:21:53 -0700
committerZac Medico <zmedico@gentoo.org>2011-08-12 04:21:53 -0700
commitc114ae3f89f41a05b3b695be7984b8300bd3c68b (patch)
tree0790646ec24cf738bc7a8b25f252ed2bb9437fd2
parente3954bead8d7e37978cac4ae5a5ec7836d3dcd1c (diff)
downloadportage-c114ae3f89f41a05b3b695be7984b8300bd3c68b.tar.gz
portage-c114ae3f89f41a05b3b695be7984b8300bd3c68b.tar.bz2
portage-c114ae3f89f41a05b3b695be7984b8300bd3c68b.zip
repoman: warn when --if-modified finds nothing
-rwxr-xr-xbin/repoman11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman
index e806b3125..91704ca82 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 = None
+modified_pkgs = 0
+if options.if_modified == "y" and not vcs:
+ logging.info("Not in a version controlled repository; disabling --if-modified.")
+ options.if_modified = "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 = os.path.join(catdir, checkdir_relative)
checkdir_relative = os.path.join(".", checkdir_relative)
- if vcs and options.if_modified == "y":
+ if options.if_modified == "y":
checkdir_modified = False
checkdir_pattern = checkdir_relative.rstrip(os.sep) + os.sep
for f in chain(mychanged, mynew):
if f.startswith(checkdir_pattern):
checkdir_modified = True
+ modified_pkgs += 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))
+if options.if_modified == "y" and modified_pkgs < 1:
+ logging.warn("--if-modified is enabled, but no modified packages were found!")
+
if options.mode == "manifest":
sys.exit(dofail)