1 |
Author: zmedico |
2 |
Date: 2008-03-28 12:28:25 +0000 (Fri, 28 Mar 2008) |
3 |
New Revision: 9562 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/dohtml |
7 |
Log: |
8 |
Only show the eqawarn from bug #149745 when nothing is found to install. Also, |
9 |
exit successfully unless nothing is found to install. (trunk r9484) |
10 |
|
11 |
|
12 |
Modified: main/branches/2.1.2/bin/dohtml |
13 |
=================================================================== |
14 |
--- main/branches/2.1.2/bin/dohtml 2008-03-28 12:23:28 UTC (rev 9561) |
15 |
+++ main/branches/2.1.2/bin/dohtml 2008-03-28 12:28:25 UTC (rev 9562) |
16 |
@@ -46,6 +46,8 @@ |
17 |
cmd += "eqawarn \"%s\" ; " % line |
18 |
os.spawnlp(os.P_WAIT, "bash", "bash", "-c", cmd) |
19 |
|
20 |
+skipped_directories = [] |
21 |
+ |
22 |
def install(basename, dirname, options, prefix=""): |
23 |
fullpath = basename |
24 |
if prefix: |
25 |
@@ -70,8 +72,8 @@ |
26 |
if prefix: pfx = prefix + "/" + pfx |
27 |
install(i, dirname, options, pfx) |
28 |
elif not options.recurse and os.path.isdir(fullpath): |
29 |
- eqawarn(["QA Notice: dohtml on directory " + \ |
30 |
- "'%s' without recursion option" % fullpath]) |
31 |
+ global skipped_directories |
32 |
+ skipped_directories.append(fullpath) |
33 |
return False |
34 |
else: |
35 |
return False |
36 |
@@ -166,19 +168,22 @@ |
37 |
print "Document prefix : '" + options.doc_prefix + "'" |
38 |
print "Allowed files :", options.allowed_files |
39 |
|
40 |
- success = True |
41 |
+ success = False |
42 |
|
43 |
for x in args: |
44 |
basename = os.path.basename(x) |
45 |
dirname = os.path.dirname(x) |
46 |
- if not install(basename, dirname, options): |
47 |
- success = False |
48 |
- |
49 |
+ success |= install(basename, dirname, options) |
50 |
+ |
51 |
if success: |
52 |
retcode = 0 |
53 |
else: |
54 |
retcode = 1 |
55 |
- |
56 |
+ global skipped_directories |
57 |
+ for x in skipped_directories: |
58 |
+ eqawarn(["QA Notice: dohtml on directory " + \ |
59 |
+ "'%s' without recursion option" % x]) |
60 |
+ |
61 |
sys.exit(retcode) |
62 |
|
63 |
if __name__ == "__main__": |
64 |
|
65 |
-- |
66 |
gentoo-commits@l.g.o mailing list |