From c8145d1146c3aae946dfbb441d873bdd95bdf6ae Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Wed, 24 Jun 2020 21:15:00 +0200 Subject: [PATCH] up to 1.0.0.64 --- steam-launcher.spec | 4 +- steamdeps.patch | 100 +++++++++++++------------------------------- 2 files changed, 31 insertions(+), 73 deletions(-) diff --git a/steam-launcher.spec b/steam-launcher.spec index 01bd7c6..2768aa6 100644 --- a/steam-launcher.spec +++ b/steam-launcher.spec @@ -1,11 +1,11 @@ Summary: Launcher for the Steam software distribution service Name: steam-launcher -Version: 1.0.0.63 +Version: 1.0.0.64 Release: 1 License: distributable Group: Applications Source0: http://repo.steampowered.com/steam/pool/steam/s/steam/steam_%{version}.tar.gz -# Source0-md5: ace21a51ae486ebf838fa9a89f70ca46 +# Source0-md5: 4c87bdc51ca65fcf6a265dda30e36811 Source1: %{name}.sysconfig Patch0: steamdeps.patch Patch1: desktop_path.patch diff --git a/steamdeps.patch b/steamdeps.patch index 2dacc01..d49dced 100644 --- a/steamdeps.patch +++ b/steamdeps.patch @@ -1,6 +1,6 @@ ---- steam-launcher/bin_steamdeps.py.orig 2020-06-15 16:29:37.582721048 +0200 -+++ steam-launcher/bin_steamdeps.py 2020-06-15 16:58:54.551881214 +0200 -@@ -20,24 +20,92 @@ +--- steam-launcher/bin_steamdeps.py.orig 2020-06-24 12:36:09.000000000 +0200 ++++ steam-launcher/bin_steamdeps.py 2020-06-24 13:18:56.355636195 +0200 +@@ -27,24 +27,92 @@ # This is the set of supported dependency formats SUPPORTED_STEAM_DEPENDENCY_VERSION = ['1'] @@ -100,42 +100,27 @@ ### -@@ -50,31 +118,32 @@ - else: - return name - -- - # - # Check to see if another package Provides this package +@@ -61,16 +129,27 @@ # N.B. Version checks are not supported on virtual packages # def is_provided(pkgname): -- try: -- process = subprocess.Popen(['apt-cache', 'showpkg', pkgname], -- stdout=subprocess.PIPE, -- stderr=subprocess.PIPE) -- pattern = re.compile(r'^Reverse Provides:') -- providers = {} -- for line in process.stdout: -- if re.match(pattern, str(line, 'utf-8')): -- for provider in process.stdout: -- (name, version) = provider.split() -- providers[name] = version -- for provider in providers.keys(): -- if has_package(provider): -- return True -- return False -- except (OSError, FileNotFoundError): -- return False +- """ +- Check to see if another package Provides this package +- """ +- cache = apt.Cache() +- pkgs = cache.get_providing_packages(pkgname) +- for pkg in pkgs: +- if pkg.is_installed: +- return True - return False + if ":" in pkgname: + pkgname, arch = pkgname.split(":", 1) + else: + arch = None -+ + + if pkgname.startswith("@"): + pkgname = pkgname[1:] - ++ + process = subprocess.Popen(['rpm', '-q', '--what-provides', pkgname], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + for line in process.stdout: @@ -152,7 +137,7 @@ ### class Package: -@@ -96,9 +165,17 @@ +@@ -92,9 +171,17 @@ return is_provided(self.name) for (op, version) in self.version_conditions: @@ -173,27 +158,7 @@ return True -@@ -111,18 +188,7 @@ - - ### - def has_package(package): -- process = subprocess.Popen(['dpkg', '-l', package], stdout=subprocess.PIPE, -- stderr=subprocess.PIPE) -- installed_pattern = re.compile(r"^\Si\s+([^\s]+)\s+([^\s]+)") -- for line in process.stdout: -- line = line.decode("utf-8").strip() -- match = re.match(installed_pattern, line) -- if match is None: -- continue -- -- return True -- return False -- -+ return is_provided(package) - - def is_glvnd(): - try: -@@ -139,6 +205,7 @@ +@@ -120,6 +207,7 @@ def remap_package(name): @@ -201,23 +166,16 @@ if name in ( 'python-apt', ): -@@ -218,10 +285,13 @@ - """ - if "DISPLAY" in os.environ: +@@ -224,6 +312,8 @@ programs = [ -- ("gnome-terminal", -- ["gnome-terminal", "--disable-factory", "-t", title, "-e"]), -+ # PLD: --disable-factory doesn't work any more -+ #("gnome-terminal", -+ # ["gnome-terminal", "--disable-factory", "-t", title, "-e"]), ("konsole", ["konsole", "--nofork", "-p", "tabtitle=" + title, "-e"]), + ("Terminal", + ["Terminal", "--disable-server", "--title"+title, "-x"]), ("xterm", ["xterm", "-bg", "#383635", "-fg", "#d1cfcd", "-T", title, "-e"]), - ( -@@ -230,7 +300,7 @@ + ("x-terminal-emulator", +@@ -240,7 +330,7 @@ ] for (program, commandLine) in programs: if subprocess.call(['which', program], @@ -226,7 +184,7 @@ return commandLine # Fallback if no GUI terminal program is available -@@ -245,17 +315,21 @@ +@@ -255,17 +345,21 @@ to do this, but nothing that exists yet does what we need. """ @@ -252,7 +210,7 @@ # If your host file is misconfigured in certain circumstances this # can cause sudo to block for a while, which causes gksudo to go into # limbo and never return. -@@ -272,31 +346,30 @@ +@@ -282,31 +376,30 @@ else return 0 fi @@ -297,7 +255,7 @@ os.write(fd, script.encode("utf-8")) os.close(fd) os.chmod(script_file, (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)) -@@ -307,6 +380,7 @@ +@@ -317,6 +410,7 @@ except KeyboardInterrupt: pass os.unlink(script_file) @@ -305,7 +263,7 @@ # Read the status out of the file, since if we ran the script in a # terminal the process status will be whether the terminal started -@@ -318,6 +392,9 @@ +@@ -328,6 +422,9 @@ os.unlink(status_file) @@ -315,7 +273,7 @@ return status -@@ -345,11 +422,11 @@ +@@ -355,11 +452,11 @@ "STEAM_DEPENDENCY_VERSION"]) return False @@ -330,7 +288,7 @@ "your distribution.\n") return False -@@ -365,7 +442,11 @@ +@@ -375,7 +472,11 @@ sys.stderr.write("Usage: %s dependencies.txt\n" % sys.argv[0]) return 1 @@ -343,7 +301,7 @@ try: fp = open(sys.argv[1]) except Exception as e: -@@ -404,10 +485,20 @@ +@@ -414,10 +515,20 @@ row = [] for section in line.split("|"): @@ -365,7 +323,7 @@ packages[package.name] = package row.append(package) -@@ -435,22 +526,28 @@ +@@ -445,22 +556,28 @@ if "COLUMNS" in os.environ: del os.environ["COLUMNS"] @@ -400,7 +358,7 @@ for row in dependencies: if len(row) == 0: continue -@@ -461,7 +558,10 @@ +@@ -471,7 +588,10 @@ satisfied = True break if not satisfied: @@ -412,7 +370,7 @@ # If we have anything to install, do it! if len(needed) > 0: -@@ -475,7 +575,12 @@ +@@ -485,7 +605,12 @@ print("Package %s needs to be installed" % package.name, file=sys.stderr) -- 2.43.0