[game-data-packager] 02/09: Revert "Add support for the equivalent of dh_installdocs --link-doc"

Simon McVittie smcv at debian.org
Mon Jan 4 09:04:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository game-data-packager.

commit 108216fb438ef4bdce5d947398e4e352308a447b
Author: Simon McVittie <smcv at debian.org>
Date:   Mon Jan 4 07:49:10 2016 +0000

    Revert "Add support for the equivalent of dh_installdocs --link-doc"
    
    This turns out to be not such a good idea, because it's hard to get
    the right dir-to-symlink/symlink-to-dir glue into a generated package.
    
    This reverts commit d4bd87ef501056424300dcddf3d19a1167898a6c.
---
 game_data_packager/__init__.py | 10 +---------
 game_data_packager/build.py    | 22 +++++++---------------
 2 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 661aea8..618b475 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -238,9 +238,6 @@ class GameDataPackage(object):
         else:
             self.install_to = ASSETS + '/' + name
 
-        # link documentation to this package, like dh_installdocs --link-doc
-        self.link_doc = None
-
         # If true, this package is allowed to be empty
         self.empty = False
 
@@ -791,7 +788,7 @@ class GameData(object):
                 'rip_cd', 'architecture', 'aliases', 'better_version', 'langs', 'mutually_exclusive',
                 'copyright', 'engine', 'lang', 'component', 'section', 'disks', 'provides',
                 'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki', 'copyright_notice',
-                'short_description', 'link_doc', 'empty'):
+                'short_description', 'empty'):
             if k in d:
                 setattr(package, k, d[k])
 
@@ -1170,11 +1167,6 @@ class GameData(object):
             assert (not package.better_version or
               package.better_version in self.packages), package.better_version
 
-            if package.link_doc is not None:
-                assert package.link_doc in self.packages, package.name
-                assert self.packages[package.link_doc].version == \
-                        package.version, package.name
-
             # check for stale missing_langs
             if not package.demo_for:
                 assert not set(package.langs).intersection(self.missing_langs)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 3522961..1e8176f 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1509,21 +1509,12 @@ class PackagingTask(object):
         if not self.check_complete(package, log=True):
             return False
 
-        docdir = os.path.join('usr/share/doc', package.name)
-        dest_docdir = os.path.join(destdir, docdir)
+        docdir = os.path.join(destdir, 'usr/share/doc', package.name)
+        mkdir_p(docdir)
+        shutil.copyfile(os.path.join(DATADIR, 'changelog.gz'),
+                os.path.join(docdir, 'changelog.gz'))
 
-        if package.link_doc is None:
-            mkdir_p(dest_docdir)
-            shutil.copyfile(os.path.join(DATADIR, 'changelog.gz'),
-                    os.path.join(dest_docdir, 'changelog.gz'))
-
-            self.fill_docs(package, destdir, dest_docdir)
-        else:
-            orig_dest_docdir = dest_docdir
-            docdir = os.path.join('usr/share/doc', package.link_doc)
-            dest_docdir = os.path.join(destdir, docdir)
-            mkdir_p(dest_docdir)
-            os.symlink('../' + package.link_doc, orig_dest_docdir)
+        self.fill_docs(package, destdir, docdir)
 
         for wanted in (package.install_files | package.optional_files):
             install_as = wanted.install_as
@@ -1556,7 +1547,8 @@ class PackagingTask(object):
                     install_to = package.install_to
 
                 if install_to.startswith('$docdir'):
-                    install_to = docdir + install_to[7:]
+                    install_to = 'usr/share/doc/%s%s' % (package.name,
+                            install_to[7:])
 
                 copy_to = os.path.join(destdir, install_to, install_as)
                 copy_to_dir = os.path.dirname(copy_to)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list