summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-05 03:33:12 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-05 03:33:12 +0000
commiteb458949e7634f7353c8604f58fb495ce04e9871 (patch)
tree4a21d7695c4e01871f521a9ccf17319db524e09a /bin
parent7c3688f2701bb68c33d951123cdf6b727c208a8e (diff)
downloadportage-eb458949e7634f7353c8604f58fb495ce04e9871.tar.gz
portage-eb458949e7634f7353c8604f58fb495ce04e9871.tar.bz2
portage-eb458949e7634f7353c8604f58fb495ce04e9871.zip
Eliminate confusing false positive error messages
for SRC_URI.syntax and digestentry.unused that are reported when the SRC_URI for one or more ebuilds can't be parsed for some reason. There's no point in producing a false error here since the root cause will produce a valid error elsewhere, such as "SRC_URI.syntax" or "ebuild.sytax". (trunk r7905) svn path=/main/branches/2.1.2/; revision=7941
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman29
1 files changed, 22 insertions, 7 deletions
diff --git a/bin/repoman b/bin/repoman
index 49b3d8a64..42e82f855 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -997,18 +997,33 @@ for x in scanlist:
fetchlist_dict = portage.FetchlistDict(checkdir, repoman_settings, portdb)
myfiles_all = []
+ src_uri_error = False
for mykey in fetchlist_dict:
try:
myfiles_all.extend(fetchlist_dict[mykey])
except portage_exception.InvalidDependString, e:
- stats["SRC_URI.syntax"] = stats["SRC_URI.syntax"] + 1
- fails["SRC_URI.syntax"].append(mykey+".ebuild SRC_URI: "+str(e))
+ src_uri_error = True
+ try:
+ portdb.aux_get(mykey, ["SRC_URI"])
+ except KeyError:
+ # This will be reported as an "ebuild.syntax" error.
+ pass
+ else:
+ stats["SRC_URI.syntax"] = stats["SRC_URI.syntax"] + 1
+ fails["SRC_URI.syntax"].append(
+ "%s.ebuild SRC_URI: %s" % (mykey, e))
del fetchlist_dict
- myfiles_all = set(myfiles_all)
- for entry in mydigests:
- if entry not in myfiles_all:
- stats["digestentry.unused"] += 1
- fails["digestentry.unused"].append(checkdir+"::"+entry)
+ if not src_uri_error:
+ # This test can produce false positives if SRC_URI could not
+ # be parsed for one or more ebuilds. There's no point in
+ # producing a false error here since the root cause will
+ # produce a valid error elsewhere, such as "SRC_URI.syntax"
+ # or "ebuild.sytax".
+ myfiles_all = set(myfiles_all)
+ for entry in mydigests:
+ if entry not in myfiles_all:
+ stats["digestentry.unused"] += 1
+ fails["digestentry.unused"].append(checkdir+"::"+entry)
del myfiles_all
if os.path.exists(checkdir+"/files"):