Skip to content
Snippets Groups Projects
Commit 47a13f17 authored by Simon McVittie's avatar Simon McVittie
Browse files

populate-depot: Set filter_exclusive_priority equal to major version


Previously we were setting `filter_exclusive_priority` to 1 for all
"pure" (non-layered) container runtimes as per steamrt/tasks#426,
but in fact that was an oversight. Instead, we need to set a unique
priority for each distinct ABI (scout, soldier, sniper and so on).

This is because `Properties → Compatibility → Force the use of…`
lists all compatibility tools that have a `filter_exclusive_priority`
equal to the one that has been set on the app/game. We don't want
to list SLR 2.0 (soldier) for games that require the
Steam Runtime 3 (sniper) ABI, and we don't want to list a possible
future SLR 4 (medic) for sniper games either.

We assume here that future runtimes will follow the pattern set by
steamrt5 and have boring, pragmatic codenames. If we reach steamrt9
(which we should start work on in around 2031, assuming we continue
to do one Steam Runtime per Debian release) without the design having
changed, then we will need to do some renumbering at that point.

steamrt/tasks#597

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent f7326c8d
No related branches found
No related tags found
1 merge request!768populate-depot: Set filter_exclusive_priority equal to major version
Pipeline #108421 passed
...@@ -82,6 +82,13 @@ DEFAULT_IMAGES_URI = ( ...@@ -82,6 +82,13 @@ DEFAULT_IMAGES_URI = (
'https://repo.steampowered.com/steamrt-images-SUITE/snapshots' 'https://repo.steampowered.com/steamrt-images-SUITE/snapshots'
) )
SUITES = {
'scout': 1,
'soldier': 2,
'sniper': 3,
'medic': 4,
}
class InvocationError(Exception): class InvocationError(Exception):
pass pass
...@@ -1053,10 +1060,40 @@ class Main: ...@@ -1053,10 +1060,40 @@ class Main:
'--verb=%verb%', '--verb=%verb%',
'--', '--',
] ]
# Each ABI level needs a unique "priority" so that we will
# not suggest SLR 2.0 as a runtime for SLR 3.0 games, etc.;
# and they all need to be less than 10, to avoid colliding
# with SLR 1.0 (scout), which needs to be highest-priority
# to make it the default for legacy games.
filter_exclusive_priority = '9'
if runtime.suite.startswith('steamrt'):
# steamrt5, steamrt6, ... get priority 5, 6, ...
# If we get to steamrt9 with this limitation still
# present, we'll have to bump the priority of SLR 1.0
# or teach the Steam Client a different mechanism.
major_version = runtime.suite[len('steamrt'):]
assert int(major_version) >= 5, major_version
assert int(major_version) <= 9, major_version
filter_exclusive_priority = major_version
elif runtime.suite == 'scout':
# Hypothetically we might have a super-strict scout
# runtime for QA purposes (steamrt/tasks#59) and if
# we do, it must match SLR 1.0
filter_exclusive_priority = '10'
else:
# For older suites with whimsical codenames, we have a
# mapping from codename to major version.
# Set the priority equal to the major version.
filter_exclusive_priority = str(
SUITES.get(runtime.suite, 9)
)
content: Dict[str, Any] = dict( content: Dict[str, Any] = dict(
manifest=dict( manifest=dict(
commandline=' '.join(words), commandline=' '.join(words),
filter_exclusive_priority='1', filter_exclusive_priority=filter_exclusive_priority,
version='2', version='2',
use_tool_subprocess_reaper='1', use_tool_subprocess_reaper='1',
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment