[game-data-packager] 04/05: Cope with Replaces potentially being a list

Simon McVittie smcv at debian.org
Wed Jul 15 09:22:43 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 6f2abb267ebbc1f0281222a924f1449cabe785ff
Author: Simon McVittie <smcv at debian.org>
Date:   Wed Jul 15 10:17:20 2015 +0100

    Cope with Replaces potentially being a list
---
 game_data_packager/__init__.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 9f7eb0c..62edbc1 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -2250,9 +2250,15 @@ class GameData(object):
                 suggests.add(other_package.name)
         assert package.name not in provides, \
                "A package shouldn't extraneously provide itself"
+
+        # Shortcut: if A Replaces B, A automatically Conflicts B
         replace = package.debian.get('replaces')
         if replace:
-            conflicts.add(replace)
+            if isinstance(replace, str):
+                conflicts.add(replace)
+            elif isinstance(replace, list):
+                for x in replace:
+                    conflicts.add(x)
 
         if depends:
             control['Depends'] = ', '.join(sorted(depends))

-- 
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