[game-data-packager] 02/02: tag games not available for sale anymore
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Mon May 1 11:51:39 UTC 2017
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 a1526b6d3bf7f898b5bf87bca4d05e7a8143cd8a
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon May 1 13:50:32 2017 +0200
tag games not available for sale anymore
---
data/descent1.yaml | 1 +
data/descent2.yaml | 1 +
data/duke3d.yaml | 9 +++++----
debian/changelog | 1 +
doc/tags.txt | 2 ++
game_data_packager/__init__.py | 6 +++++-
tools/gog_updated.py | 8 +++++---
7 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/data/descent1.yaml b/data/descent1.yaml
index d227bc1..e79d2ea 100644
--- a/data/descent1.yaml
+++ b/data/descent1.yaml
@@ -37,6 +37,7 @@ packages:
# http://www.gog.com/game/${url}?pp=${pp}
url: descent_1_descent_2
game: descent
+ removed: 2015/12/30
# id found in dxx-rebirth's INSTALL.txt
# and here http://www.dxx-rebirth.com/game-content/
pp: fc074d501302eb2b93e2554793fcaf50b3bf7291
diff --git a/data/descent2.yaml b/data/descent2.yaml
index 002a25d..37a184f 100644
--- a/data/descent2.yaml
+++ b/data/descent2.yaml
@@ -17,6 +17,7 @@ packages:
url: descent_1_descent_2
game: descent_2
pp: fc074d501302eb2b93e2554793fcaf50b3bf7291
+ removed: 2015/12/30
steam:
id: 273580
path: "common/Descent 2"
diff --git a/data/duke3d.yaml b/data/duke3d.yaml
index 2ddc307..6424fdf 100644
--- a/data/duke3d.yaml
+++ b/data/duke3d.yaml
@@ -29,10 +29,11 @@ packages:
id: 225140
path: common/Duke Nukem 3D/gameroot/classic
native: true
- #gog:
- # url: duke_nukem_3d_atomic_edition
- # # banner at http://eduke32.com/
- # pp: 6c1e671f9af5b46d9c1a52067bdf0e53685674f7
+ gog:
+ url: duke_nukem_3d_atomic_edition
+ removed: 2015/12/28
+ # banner at http://eduke32.com/
+ pp: 6c1e671f9af5b46d9c1a52067bdf0e53685674f7
url_misc: https://3drealms.com/catalog/duke-nukem-3d_27/
install:
- duke3d.grp
diff --git a/debian/changelog b/debian/changelog
index f991599..edc8bfc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,7 @@ game-data-packager (50) UNRELEASED; urgency=medium
- AppArmor: Allow more kinds of device enumeration [smcv]
- build: Don't warn about being unable to derive one of several
alternatives [smcv]
+ - Tag games not available for sale anymore (Closes: #810059) [adetiste]
* Internal changes:
- Fix typo in TODO [nyav] (Closes: #857880)
- Use locale 'C.UTF-8' instead of 'C' in Makefile,
diff --git a/doc/tags.txt b/doc/tags.txt
index c85877a..1989e05 100644
--- a/doc/tags.txt
+++ b/doc/tags.txt
@@ -16,6 +16,7 @@ gog:
pp: string (hash)
game: string
path: string (prefix)
+ removed: string or 'True'
try_repack_from: list
missing_langs: list
@@ -57,6 +58,7 @@ packages:
pp: string (hash)
game: string
path: string (prefix)
+ removed: string or 'True'
steam:
id: int
path: string
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 80250f9..69f2ccd 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -258,12 +258,14 @@ class GameData(object):
# compute webshop URL's
gog_url = self.gog.get('url')
+ gog_removed = self.gog.get('removed')
gog_pp = '22d200f8670dbdb3e253a90eee5098477c95c23d' # ScummVM
steam_id = {self.steam.get('id')}
for p in sorted(self.packages.keys(), reverse=True):
package = self.packages[p]
if package.gog:
gog_url = package.gog.get('url', gog_url)
+ gog_removed = package.gog.get('removed', gog_removed)
gog_pp = package.gog.get('pp', gog_pp)
steam_id.add(package.steam.get('id'))
if package.url_misc:
@@ -271,7 +273,7 @@ class GameData(object):
steam_id.discard(None)
if steam_id:
self.url_steam = 'http://store.steampowered.com/app/%s/' % min(steam_id)
- if gog_url:
+ if gog_url and not gog_removed:
self.url_gog = 'http://www.gog.com/game/' + gog_url + '?pp=' + gog_pp
def edit_help_text(self):
@@ -842,6 +844,8 @@ class GameData(object):
if package.gog == False:
return
gog = package.gog or self.gog
+ if 'removed' in gog:
+ return
return gog.get('game') or gog.get('url')
def load_games(game='*', use_vfs=USE_VFS, use_yaml=False):
diff --git a/tools/gog_updated.py b/tools/gog_updated.py
index e145fe6..ecf1862 100755
--- a/tools/gog_updated.py
+++ b/tools/gog_updated.py
@@ -36,10 +36,12 @@ def decode_filename(archive):
print('# Reading data from YAML...')
for name, game in load_games().items():
game.load_file_data()
- has_tags = has_archive = False
+ has_tags = has_archive = is_removed = False
for package in game.packages.values():
gog = package.gog or game.gog
- if 'url' in gog:
+ if 'removed' in gog:
+ is_removed = True
+ elif 'url' in gog:
has_tags = True
for filename,f in game.files.items():
if filename.startswith('setup_') and filename.endswith('.exe'):
@@ -50,7 +52,7 @@ for name, game in load_games().items():
continue
if LooseVersion(version) > LooseVersion(yaml_files.get(supported, '0')):
yaml_files[supported] = version
- if has_tags != has_archive:
+ if has_tags != has_archive and not is_removed:
print('GOG metadata not in sync for %s. (has_tags: %s, has_archive: %s)'
% (name, has_tags, has_archive))
--
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