[game-data-packager] 07/11: PackagingTask: distinguish docdir with and without destdir prepended
Simon McVittie
smcv at debian.org
Tue Jan 5 09:55:27 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 92d1e7201a4ba1a31a425d5907ff58b9ba9de9f5
Author: Simon McVittie <smcv at debian.org>
Date: Tue Jan 5 09:00:28 2016 +0000
PackagingTask: distinguish docdir with and without destdir prepended
In the symlink-creation code, we were actually getting it wrong
for packages like quake3 that use $docdir, and trying to create a
symlink from /tmp/.../usr/share/doc/... to /tmp/.../usr/share/doc/...;
but because os.path.join(destdir, "/tmp/...") == "/tmp/...",
and because we have code to make the symlinks as relative as possible,
it worked anyway.
Similarly, distinguish licensedir with and without destdir prepended.
---
game_data_packager/build.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 4d9a2a0..543518a 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1307,7 +1307,7 @@ class PackagingTask(object):
return complete
def fill_docs(self, package, destdir, docdir):
- copy_to = os.path.join(docdir, 'copyright')
+ copy_to = os.path.join(destdir, docdir, 'copyright')
for n in (package.name, self.game.shortname):
copy_from = os.path.join(DATADIR, n + '.copyright')
if os.path.exists(copy_from):
@@ -1553,13 +1553,14 @@ class PackagingTask(object):
if not self.check_complete(package, log=True):
return False
- docdir = os.path.join(destdir, 'usr/share/doc', package.name)
- mkdir_p(docdir)
+ docdir = os.path.join('usr/share/doc', package.name)
+ dest_docdir = os.path.join(destdir, docdir)
+ mkdir_p(dest_docdir)
# only create licensedir if needed
- licensedir = os.path.join(destdir, self.packaging.LICENSEDIR,
- package.name)
+ licensedir = os.path.join(self.packaging.LICENSEDIR, package.name)
+ dest_licensedir = os.path.join(destdir, licensedir)
shutil.copyfile(os.path.join(DATADIR, 'changelog.gz'),
- os.path.join(docdir, 'changelog.gz'))
+ os.path.join(destdir, docdir, 'changelog.gz'))
self.fill_docs(package, destdir, docdir)
@@ -1599,7 +1600,7 @@ class PackagingTask(object):
install_to = 'usr/share/doc/%s%s' % (package.name,
install_to[7:])
elif install_to.startswith('$licensedir'):
- mkdir_p(licensedir)
+ mkdir_p(dest_licensedir)
install_to = '%s/%s%s' % (self.packaging.LICENSEDIR,
package.name, install_to[11:])
--
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