dohtml: Add .ico, .svg, .xhtml and .xml extensions to default list in EAPI="4-python".
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 25 Jun 2012 02:37:27 +0000 (04:37 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 25 Jun 2012 02:37:27 +0000 (04:37 +0200)
bin/dohtml.py
doc/package/ebuild/eapi/4-python.docbook

index 96e78ef6f4bcccfe09830d9824272c58c857dc94..ba16b4662e3acc690cd8168d0ebbf58d87bd8c26 100755 (executable)
 #
 #
 # 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)
index 8420abb295f98c63fa3b710cfe5195a1b5c4cd40..ec5fd83c44e2c8823232ef8fcc11d18235cda72a 100644 (file)
@@ -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>