[game-data-packager] 01/04: preseve timestamps for id-shr-extract
Simon McVittie
smcv at debian.org
Wed Jan 21 21:24:55 UTC 2015
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 32d85f9293b8040f9a44920b71e53ce507047c3b
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Wed Jan 21 17:22:26 2015 +0100
preseve timestamps for id-shr-extract
---
lib/game_data_packager/__init__.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index f2ea54b..a89e413 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1362,8 +1362,13 @@ class GameData(object):
subprocess.check_call(['id-shr-extract',
os.path.abspath(found_name)],
cwd=tmpdir)
+ # this format doesn't store a timestamp, so the extracted
+ # files will instead inherit the archive's timestamp
+ orig_time = os.stat(found_name).st_mtime
for f in to_unpack:
- self.consider_file(os.path.join(tmpdir, f), True)
+ tmp = os.path.join(tmpdir, f)
+ os.utime(tmp, (orig_time, orig_time))
+ self.consider_file(tmp, True)
elif fmt == 'unzip':
to_unpack = provider.unpack.get('unpack', provider.provides)
logger.debug('Extracting %r from %s',
--
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