Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 105973 Details for
Bug 149745
dohtml fails silently on directories w/o recursion arg
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dohtml.patch
dohtml.patch (text/plain), 2.70 KB, created by
brad walker
on 2007-01-08 01:05:22 UTC
(
hide
)
Description:
dohtml.patch
Filename:
MIME Type:
Creator:
brad walker
Created:
2007-01-08 01:05:22 UTC
Size:
2.70 KB
patch
obsolete
>--- /usr/lib/portage/bin/dohtml.old 2007-01-07 16:11:16.000000000 -0700 >+++ /usr/lib/portage/bin/dohtml 2007-01-07 18:03:54.000000000 -0700 >@@ -14,8 +14,8 @@ > # Detailed usage: > # dohtml <list-of-files> > # - will install the files in the list of files (space-separated list) into >-# /usr/share/doc/${PF}/html, provided the file ends in .html, .png, .jpg >-# or .css >+# /usr/share/doc/${PF}/html, provided the file ends in .css, .gif, .htm, >+# .html, .jpg, .js or .png > # dohtml -r <list-of-files-and-directories> > # - will do as 'dohtml', but recurse into all directories, as long as the > # directory name is not CVS >@@ -34,6 +34,8 @@ > import sys > import types > >+from output import EOutput >+ > def dodir(path): > os.system("install -d '%s'" % path) > >@@ -48,22 +50,31 @@ > if dirname: fullpath = dirname + "/" + fullpath > > if options.DOCDESTTREE: >- destdir = options.D + "usr/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix >+ docdesttree = options.DOCDESTTREE > else: >- destdir = options.D + "usr/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix >+ docdesttree = 'html' >+ destdir = options.D + '/'.join (('usr/share/doc', >+ options.PF, >+ docdesttree, >+ options.doc_prefix, >+ prefix)) > > if os.path.isfile(fullpath): > ext = os.path.splitext(basename)[1] > if (len(ext) and ext[1:] in options.allowed_exts) or basename in options.allowed_files: > dodir(destdir) > dofile(fullpath, destdir + "/" + basename) >- elif options.recurse and os.path.isdir(fullpath) and \ >- basename not in options.disallowed_dirs: >+ elif os.path.isdir (fullpath) and basename not in options.disallowed_dirs: >+ if options.recurse: > for i in os.listdir(fullpath): > pfx = basename > if prefix: pfx = prefix + "/" + pfx > install(i, dirname, options, pfx) > else: >+ # bug #149745 >+ EOutput().ewarn ('QA Notice: directory %s given to dohtml without recursion (option -r)' % fullpath) >+ return False >+ else: > return False > return True > >@@ -151,22 +162,17 @@ > > if options.verbose: > print "Allowed extensions:", options.allowed_exts >- print "Document prefix : '" + options.doc_prefix + "'" >+ print "Document prefix : '%s'" % options.doc_prefix > print "Allowed files :", options.allowed_files > > success = True >- > for x in args: > basename = os.path.basename(x) > dirname = os.path.dirname(x) >- success = success and install(basename, dirname, options) >- >- if success: >- retcode = 0 >- else: >- retcode = 1 >+ # bug #149745, comment #1 >+ success &= install (basename, dirname, options) > >- sys.exit(retcode) >+ sys.exit (int (not success)) # 0 True, 1 False > > if __name__ == "__main__": > main()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 149745
:
105973
|
106027
|
106478