On Mon, 14 Jan 2019 at 11:45:21 +0000, Simon McVittie wrote:
> In this email I'll refer to the installation root as $STEAMDIR and
> the symlink farm as $STEAMCONFIG (those are the names used in Valve's
> /usr/bin/steam). The current /usr/games/steam in Debian uses $config to
> represent both; my proposed patches used $root and $config respectively
> (but I might revise them to use the same names that Valve do, in an
> attempt to make the situation easier to understand).

Done in my patch for #919467, which fixes pre-existing data loss when switching
between installation layouts.

With that change applied, the script supports both ways round and the change
under discussion on this bug reduces to "change the default", as attached.
Also available at <https://salsa.debian.org/games-team/steam/merge_requests/1>.

    smcv
>From 757f07b6c91e2993a7d4ea91df2d33c107aceb04 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@collabora.com>
Date: Wed, 16 Jan 2019 11:08:37 +0000
Subject: [PATCH] Default to ~/.local/share/Steam for new installations

As discussed on #916303, conflating $STEAMCONFIG with $STEAMDIR has
little benefit, but does some harm:

- Steam can't stop using ~/.steam for $STEAMCONFIG because that would be
  an API/ABI break

- The current installation layout with $STEAMCONFIG = $STEAMDIR = ~/.steam
  breaks intended functionality, because $STEAMCONFIG/steam and
  $STEAMDIR/steam are intended to have different purposes, and cannot
  both work as intended if they collide

- There is an equal amount of clutter in the home directory (namely
  ~/.steam, ~/.steampath and ~/.steampid) either way

Closes: #916303
Signed-off-by: Simon McVittie <s...@collabora.com>
---
 debian/scripts/steam | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/debian/scripts/steam b/debian/scripts/steam
index f2ae580..3622c2e 100644
--- a/debian/scripts/steam
+++ b/debian/scripts/steam
@@ -18,10 +18,6 @@ STEAMCONFIG="$HOME/.steam"
 # C:\Program Files\Steam in the Windows Steam client. In Valve's setup
 # this is distinct from ~/.steam, usually ~/.local/share/Steam.
 #
-# The historical Debian behaviour has been to use ~/.steam as the installation
-# directory in addition to using it as the control directory, in an attempt
-# to reduce clutter in the home directory.
-#
 # The shell variable name STEAMDIR matches what's used in Valve's
 # /usr/bin/steam.
 if [ -L "$STEAMCONFIG/steam" ]; then
@@ -29,12 +25,14 @@ if [ -L "$STEAMCONFIG/steam" ]; then
 elif [ -L "$STEAMCONFIG/root" ]; then
     STEAMDIR="$(readlink -e -q "$STEAMCONFIG/root")"
 elif [ -d "$STEAMCONFIG/steam" ] && ! [ -L "$STEAMCONFIG/steam" ]; then
+    # The historical Debian behaviour has been to use ~/.steam as the
+    # installation directory in addition to using it as the control directory,
+    # in an attempt to reduce clutter in the home directory. We can't
+    # easily disentangle this in existing installations.
     STEAMDIR="$HOME/.steam"
 else
-    # This is a new installation. We could either use $HOME/.steam or
-    # $XDG_DATA_HOME/Steam; see #916303 for discussion. For now behave
-    # as we historically did.
-    STEAMDIR="$HOME/.steam"
+    # This is a new installation, so behave as Valve do.
+    STEAMDIR="$XDG_DATA_HOME/Steam"
 fi
 
 ubuntu32="$STEAMDIR/ubuntu12_32"
-- 
2.20.1

Reply via email to