[game-data-packager] 03/03: drop support for 'cksums:' & 'md5sums:'
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Thu Dec 31 00:43:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository game-data-packager.
commit 50f64b64e34f5f11c01743e23fe65e24ddb2e598
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Thu Dec 31 01:41:48 2015 +0100
drop support for 'cksums:' & 'md5sums:'
in the end all 'size_and_md5' should be replaced by groups too
---
Makefile | 6 ++----
doc/adding_a_game.mdwn | 5 +++--
doc/tags.txt | 4 ----
game_data_packager/__init__.py | 13 ++++---------
tools/yaml2json.py | 3 +--
5 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/Makefile b/Makefile
index 58475e6..02c17a4 100644
--- a/Makefile
+++ b/Makefile
@@ -42,8 +42,8 @@ out/vfs.zip: $(json)
rm -f out/vfs.zip
rm -fr out/vfs
mkdir out/vfs
- cp out/*.json out/*.files out/*.size_and_md5 out/*.cksums out/vfs/
- cp out/*.md5sums out/*.sha1sums out/*.sha256sums out/*.groups out/vfs/
+ cp out/*.json out/*.files out/*.size_and_md5 out/vfs/
+ cp out/*.sha1sums out/*.sha256sums out/*.groups out/vfs/
if [ -n "$(BUILD_DATE)" ]; then \
touch --date='$(BUILD_DATE)' out/vfs/*; \
fi
@@ -87,13 +87,11 @@ clean:
rm -f ./out/changelog.gz
rm -f ./out/copyright
rm -f ./out/game-data-packager
- rm -f ./out/*.cksums
rm -f ./out/*.control.in
rm -f ./out/*.copyright
rm -f ./out/*.copyright.in
rm -f ./out/*.files
rm -f ./out/*.groups
- rm -f ./out/*.md5sums
rm -f ./out/*.preinst.in
rm -f ./out/*.png
rm -f ./out/*.sha1sums
diff --git a/doc/adding_a_game.mdwn b/doc/adding_a_game.mdwn
index 09b5e75..0784d55 100644
--- a/doc/adding_a_game.mdwn
+++ b/doc/adding_a_game.mdwn
@@ -84,7 +84,7 @@ a mapping from unique name to a mapping:
these names (case-insensitively). The default is a list containing only
the unique name.
-`md5sums`, `sha1sums`, `sha256sums` items at top level can be used to provide
+`sha1sums`, `sha256sums` items at top level can be used to provide
the hashes for a bunch of files at the same time.
The `install_files` item in a package (see below) can be used to flag
@@ -233,5 +233,6 @@ if you need to implement different command-line parsing or behaviour.
Please don't do this unless you really need to.
If you're adding a scummvm game, this list will help you find out
-which version you have, but it only includes md5sum of first data file:
+which version you have, but it only includes md5sum of
+the N-th first bytes of the main data file:
https://github.com/scummvm/scummvm/blob/master/devtools/scumm-md5.txt
diff --git a/doc/tags.txt b/doc/tags.txt
index 3e317f8..a6001f2 100644
--- a/doc/tags.txt
+++ b/doc/tags.txt
@@ -104,10 +104,6 @@ files:
size_and_md5: list
-cksums: list
-
-md5sums: list
-
sha1sums: list
sha256sums: list
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 5df3fd5..935c30b 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -556,8 +556,6 @@ class GameData(object):
for binary, data in self.data['packages'].items():
# these should only be at top level, since they are global
- assert 'cksums' not in data, binary
- assert 'md5sums' not in data, binary
assert 'sha1sums' not in data, binary
assert 'sha256sums' not in data, binary
@@ -605,7 +603,7 @@ class GameData(object):
for line in self.data['size_and_md5'].splitlines():
self._add_hash(line, 'size_and_md5')
- for alg in ('ck', 'md5', 'sha1', 'sha256'):
+ for alg in ('sha1', 'sha256'):
if alg + 'sums' in self.data:
for line in self.data[alg + 'sums'].splitlines():
self._add_hash(line, alg)
@@ -970,10 +968,7 @@ class GameData(object):
if stripped == '' or stripped.startswith('#'):
return
- if alg == 'ck':
- _, size, filename = line.split(None, 2)
- hexdigest = None
- elif alg == 'size_and_md5':
+ if alg == 'size_and_md5':
size, hexdigest, filename = line.split(None, 2)
alg = 'md5'
else:
@@ -1042,7 +1037,7 @@ class GameData(object):
stream = io.TextIOWrapper(zf.open(filename), encoding='utf-8')
self._populate_groups(stream)
- for alg in ('ck', 'md5', 'sha1', 'sha256', 'size_and_md5'):
+ for alg in ('sha1', 'sha256', 'size_and_md5'):
filename = '%s.%s%s' % (self.shortname, alg,
'' if alg == 'size_and_md5' else 'sums')
if filename in files:
@@ -1063,7 +1058,7 @@ class GameData(object):
stream = open(filename, encoding='utf-8')
self._populate_groups(stream)
- for alg in ('ck', 'md5', 'sha1', 'sha256', 'size_and_md5'):
+ for alg in ('sha1', 'sha256', 'size_and_md5'):
filename = os.path.join(DATADIR, '%s.%s%s' %
(self.shortname, alg,
'' if alg == 'size_and_md5' else 'sums'))
diff --git a/tools/yaml2json.py b/tools/yaml2json.py
index b89d7bc..fd2056a 100755
--- a/tools/yaml2json.py
+++ b/tools/yaml2json.py
@@ -89,8 +89,7 @@ def main(f, out):
elif os.path.isfile(offload):
os.remove(offload)
- for k in ('cksums', 'sha1sums', 'sha256sums', 'md5sums',
- 'size_and_md5'):
+ for k in ('sha1sums', 'sha256sums', 'size_and_md5'):
v = data.pop(k, None)
offload = os.path.splitext(out)[0] + '.' + k
--
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