From 00038b5267f5ad388b228d5f50c596f8cf1df598 Mon Sep 17 00:00:00 2001 From: thfr Date: Wed, 2 Aug 2023 02:42:55 +0000 Subject: [PATCH] backport https://github.com/ValvePython/steam/pull/437: CDNClient: Cope with longer manifest descriptions for some depots should fix most depot download scenarios, where for a while depot and manifest flags needed to be provided manually. Now it should be enough to provide -a +/- -os linux64 --- games/py-steam/Makefile | 1 + .../patches/patch-steam_client_cdn_py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 games/py-steam/patches/patch-steam_client_cdn_py diff --git a/games/py-steam/Makefile b/games/py-steam/Makefile index 092f0681c930..1c9d7d49728b 100644 --- a/games/py-steam/Makefile +++ b/games/py-steam/Makefile @@ -3,6 +3,7 @@ COMMENT = module for interacting with various Steam features MODPY_EGG_VERSION = 1.4.4 DISTNAME = steam-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} +REVISION = 0 CATEGORIES = games HOMEPAGE = https://github.com/ValvePython/steam diff --git a/games/py-steam/patches/patch-steam_client_cdn_py b/games/py-steam/patches/patch-steam_client_cdn_py new file mode 100644 index 000000000000..c326aadd8359 --- /dev/null +++ b/games/py-steam/patches/patch-steam_client_cdn_py @@ -0,0 +1,19 @@ +backport https://github.com/ValvePython/steam/pull/437: +CDNClient: Cope with longer manifest descriptions for some depots + +Index: steam/client/cdn.py +--- steam/client/cdn.py.orig ++++ steam/client/cdn.py +@@ -836,6 +836,12 @@ class CDNClient(object): + else: + manifest_gid = depot_info.get('manifests', {}).get(branch) + ++ if isinstance(manifest_gid, dict): ++ # For some depots, Steam has started returning a dict ++ # {"public": {"gid": GID, "size": ..., "download": ...}, ...} ++ # instead of a simple map {"public": GID, ...} ++ manifest_gid = manifest_gid['gid'] ++ + if manifest_gid is not None: + tasks.append( + self.gpool.spawn(