diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2012-06-25 04:37:27 +0200 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2012-06-25 04:37:27 +0200 |
commit | 4ef716471e4879833cc3804d81bebf1bfa5e24fb (patch) | |
tree | 2b0b2384c25fa67f4ada26a4efb17b20ccd48a0d | |
parent | Reformat documentation of EAPI="4-python". (diff) | |
download | portage-4ef716471e4879833cc3804d81bebf1bfa5e24fb.tar.gz portage-4ef716471e4879833cc3804d81bebf1bfa5e24fb.tar.bz2 portage-4ef716471e4879833cc3804d81bebf1bfa5e24fb.zip |
dohtml: Add .ico, .svg, .xhtml and .xml extensions to default list in EAPI="4-python".
-rwxr-xr-x | bin/dohtml.py | 20 | ||||
-rw-r--r-- | doc/package/ebuild/eapi/4-python.docbook | 6 |
2 files changed, 17 insertions, 9 deletions
diff --git a/bin/dohtml.py b/bin/dohtml.py index 96e78ef6f..ba16b4662 100755 --- a/bin/dohtml.py +++ b/bin/dohtml.py @@ -11,18 +11,18 @@ # # # Detailed usage: -# dohtml <list-of-files> -# - will install the files in the list of files (space-separated list) into +# 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 .css, .gif, .htm, # .html, .jpeg, .jpg, .js or .png. # dohtml -r <list-of-files-and-directories> -# - will do as 'dohtml', but recurse into all directories, as long as the +# - will do as 'dohtml', but recurse into all directories, as long as the # directory name is not CVS # dohtml -A jpe,java [-r] <list-of-files[-and-directories]> # - will do as 'dohtml' but add .jpe,.java (default filter list is # added to your list) # dohtml -a png,gif,html,htm [-r] <list-of-files[-and-directories]> -# - will do as 'dohtml' but filter on .png,.gif,.html,.htm (default filter +# - will do as 'dohtml' but filter on .png,.gif,.html,.htm (default filter # list is ignored) # dohtml -x CVS,SCCS,RCS -r <list-of-files-and-directories> # - will do as 'dohtml -r', but ignore directories named CVS, SCCS, RCS @@ -88,7 +88,7 @@ class OptionsClass: self.PF = "" self.ED = "" self.DOCDESTTREE = "" - + if "PF" in os.environ: self.PF = os.environ["PF"] if "force-prefix" not in os.environ.get("FEATURES", "").split() and \ @@ -98,8 +98,10 @@ class OptionsClass: self.ED = os.environ.get("ED", "") if "_E_DOCDESTTREE_" in os.environ: self.DOCDESTTREE = os.environ["_E_DOCDESTTREE_"] - + self.allowed_exts = ['css', 'gif', 'htm', 'html', 'jpeg', 'jpg', 'js', 'png'] + if os.environ.get("EAPI", "0") in ("4-python",): + self.allowed_exts += ['ico', 'svg', 'xhtml', 'xml'] self.allowed_files = [] self.disallowed_dirs = ['CVS'] self.recurse = False @@ -126,7 +128,7 @@ def print_help(): def parse_args(): options = OptionsClass() args = [] - + x = 1 while x < len(sys.argv): arg = sys.argv[x] @@ -158,7 +160,7 @@ def parse_args(): else: args.append(sys.argv[x]) x += 1 - + return (options, args) def main(): @@ -171,7 +173,7 @@ def main(): print("Allowed files :", options.allowed_files) success = False - + for x in args: basename = os.path.basename(x) dirname = os.path.dirname(x) diff --git a/doc/package/ebuild/eapi/4-python.docbook b/doc/package/ebuild/eapi/4-python.docbook index 8420abb29..ec5fd83c4 100644 --- a/doc/package/ebuild/eapi/4-python.docbook +++ b/doc/package/ebuild/eapi/4-python.docbook @@ -5,6 +5,12 @@ </para> <section id='package-ebuild-eapi-4-python-helpers'> <title>Helpers</title> + <section id='package-ebuild-eapi-4-python-helpers-dohtml-extended-default-list-of-extensions'> + <title>Extended default list of extensions in dohtml</title> + <para> + dohtml by default additionally installs files with .ico, .svg, .xhtml and .xml extensions. + </para> + </section> <section id='package-ebuild-eapi-4-python-helpers-banned-in-global-scope'> <title>Helpers Banned in Global Scope</title> <para> |