summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-18 22:12:52 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-18 22:12:52 +0000
commitdd79b0960c9064d1250ac9eeaa999d12e9e6f978 (patch)
tree20c0b66aca7e39f95a7dd06ba67013fa4a2ad280
parent1e62fe7d0d6b0e749fac8389dc5d28a15e4cf462 (diff)
downloadportage-dd79b0960c9064d1250ac9eeaa999d12e9e6f978.tar.gz
portage-dd79b0960c9064d1250ac9eeaa999d12e9e6f978.tar.bz2
portage-dd79b0960c9064d1250ac9eeaa999d12e9e6f978.zip
Bug #149745 - Generate an eqawarn message if dohtml is called on a directory
without the recursive option. Thanks to brad walker <bradmwalker@cableone.net> for reporting. svn path=/main/trunk/; revision=9476
-rwxr-xr-xbin/dohtml11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/dohtml b/bin/dohtml
index 6aeb68ee5..23d0292f4 100755
--- a/bin/dohtml
+++ b/bin/dohtml
@@ -39,6 +39,13 @@ def dodir(path):
def dofile(src,dst):
os.spawnlp(os.P_WAIT, "install", "install", "-m0644", src, dst)
+def eqawarn(lines):
+ cmd = "source '%s/isolated-functions.sh' ; " % \
+ os.environ["PORTAGE_BIN_PATH"]
+ for line in lines:
+ cmd += "eqawarn \"%s\" ; " % line
+ os.spawnlp(os.P_WAIT, "bash", "bash", "-c", cmd)
+
def install(basename, dirname, options, prefix=""):
fullpath = basename
if prefix:
@@ -62,6 +69,10 @@ def install(basename, dirname, options, prefix=""):
pfx = basename
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])
+ return False
else:
return False
return True