summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-19 09:45:51 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-19 09:45:51 +0000
commit631119ccba71614cd3a7e1ae1ff9a333c9c4e6db (patch)
tree2662e1b8c23680f41b66875756d72415b27a5efd
parent5aeeb8a354394b2bba13786372b489e2d7c89340 (diff)
downloadportage-631119ccba71614cd3a7e1ae1ff9a333c9c4e6db.tar.gz
portage-631119ccba71614cd3a7e1ae1ff9a333c9c4e6db.tar.bz2
portage-631119ccba71614cd3a7e1ae1ff9a333c9c4e6db.zip
Only show the eqawarn from bug #149745 when nothing is found to install. Also,
exit successfully unless nothing is found to install. svn path=/main/trunk/; revision=9484
-rwxr-xr-xbin/dohtml19
1 files changed, 12 insertions, 7 deletions
diff --git a/bin/dohtml b/bin/dohtml
index 23d0292f4..6162b0199 100755
--- a/bin/dohtml
+++ b/bin/dohtml
@@ -46,6 +46,8 @@ def eqawarn(lines):
cmd += "eqawarn \"%s\" ; " % line
os.spawnlp(os.P_WAIT, "bash", "bash", "-c", cmd)
+skipped_directories = []
+
def install(basename, dirname, options, prefix=""):
fullpath = basename
if prefix:
@@ -70,8 +72,8 @@ def install(basename, dirname, options, prefix=""):
if prefix: pfx = prefix + "/" + pfx
install(i, dirname, options, pfx)
elif not options.recurse and os.path.isdir(fullpath):
- eqawarn(["QA Notice: dohtml on directory " + \
- "'%s' without recursion option" % fullpath])
+ global skipped_directories
+ skipped_directories.append(fullpath)
return False
else:
return False
@@ -166,19 +168,22 @@ def main():
print "Document prefix : '" + options.doc_prefix + "'"
print "Allowed files :", options.allowed_files
- success = True
+ success = False
for x in args:
basename = os.path.basename(x)
dirname = os.path.dirname(x)
- if not install(basename, dirname, options):
- success = False
-
+ success |= install(basename, dirname, options)
+
if success:
retcode = 0
else:
retcode = 1
-
+ global skipped_directories
+ for x in skipped_directories:
+ eqawarn(["QA Notice: dohtml on directory " + \
+ "'%s' without recursion option" % x])
+
sys.exit(retcode)
if __name__ == "__main__":