]> git.pld-linux.org Git - packages/steam-launcher.git/blobdiff - steamdeps.patch
disable debug packages; rel 2
[packages/steam-launcher.git] / steamdeps.patch
index 2dacc013dc8e1001cf08333bcfd1f7a63c122571..c4ff2ee1c9113463f1d12bfabd1a85b47ada9d8d 100644 (file)
@@ -1,12 +1,13 @@
---- 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-07-29 17:44:37.000000000 +0200
++++ steam-launcher/bin_steamdeps.py    2020-07-29 19:54:23.553743588 +0200
+@@ -34,8 +34,80 @@
  # This is the set of supported dependency formats
  SUPPORTED_STEAM_DEPENDENCY_VERSION = ['1']
  
 -_arch = None
+-
 +ARCH = "i686" # updated during package build
++ 
 +PLD_PACKAGE_MAP = {
 +        "python-apt": None,
 +        "xz-utils": "xz",
@@ -80,8 +81,9 @@
 +    config = pld_get_config()
 +    return config.get(variable, default)
  
- #
- # Get the current package architecture
+ class OsRelease:
+     def __init__(self):
+@@ -100,17 +172,12 @@
  # This may be different than the actual architecture for the case of i386
  # chroot environments on amd64 hosts.
  #
 -        _arch = subprocess.check_output(
 -            ['dpkg', '--print-architecture']).decode("utf-8").strip()
 -    return _arch
+-
 +    return PLD_ARCH_MAP[ARCH]
  
  ###
-@@ -50,31 +118,32 @@
-     else:
-         return name
--
- #
- # Check to see if another package Provides this package
+ def get_full_package_name(name):
+@@ -126,16 +193,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:
  
  ###
  class Package:
-@@ -96,9 +165,17 @@
+@@ -157,9 +235,17 @@
              return is_provided(self.name)
  
          for (op, version) in self.version_conditions:
  
          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 @@
+@@ -185,6 +271,7 @@
  
  
  def remap_package(name):
      if name in (
              'python-apt',
      ):
-@@ -218,10 +285,13 @@
-     """
-     if "DISPLAY" in os.environ:
+@@ -289,6 +376,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",
+@@ -305,7 +394,7 @@
          ]
          for (program, commandLine) in programs:
              if subprocess.call(['which', program],
                  return commandLine
  
      # Fallback if no GUI terminal program is available
-@@ -245,17 +315,21 @@
+@@ -320,17 +409,21 @@
      to do this, but nothing that exists yet does what we need.
      """
  
      # 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 @@
+@@ -347,31 +440,30 @@
      else
          return 0
      fi
      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 @@
+@@ -382,6 +474,7 @@
      except KeyboardInterrupt:
          pass
      os.unlink(script_file)
  
      # 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 @@
+@@ -393,6 +486,9 @@
  
      os.unlink(status_file)
  
      return status
  
  
-@@ -345,11 +422,11 @@
+@@ -419,11 +515,11 @@
              "STEAM_DEPENDENCY_VERSION"])
          return False
  
                           "your distribution.\n")
          return False
  
-@@ -365,7 +442,11 @@
-         sys.stderr.write("Usage: %s dependencies.txt\n" % sys.argv[0])
-         return 1
+@@ -457,7 +553,11 @@
+         os_release.dump()
+         return 0
  
 -    # Make sure we can open the file
 +    # disable steam runtime, so their libs won't conflict our binaries
 +
 +        # Make sure we can open the file
      try:
-         fp = open(sys.argv[1])
+         fp = open(args.dependencies)
      except Exception as e:
-@@ -404,10 +485,20 @@
+@@ -496,10 +596,20 @@
  
          row = []
          for section in line.split("|"):
              packages[package.name] = package
              row.append(package)
  
-@@ -435,22 +526,28 @@
+@@ -544,22 +654,28 @@
      if "COLUMNS" in os.environ:
          del os.environ["COLUMNS"]
  
      for row in dependencies:
          if len(row) == 0:
              continue
-@@ -461,7 +558,10 @@
+@@ -570,7 +686,10 @@
                  satisfied = True
                  break
          if not satisfied:
  
      # If we have anything to install, do it!
      if len(needed) > 0:
-@@ -475,7 +575,12 @@
-                 print("Package %s needs to be installed" % package.name,
-                       file=sys.stderr)
--        return update_packages(needed)
-+        if pld_config_enabled("INSTALL_PACKAGES", True):
-+            print("Installing packages as configured through {0}...".format(PLD_CONFIG_FN))
-+            return updatePackages( needed )
-+        else:
-+            print("\nWARNING: Dependencies missing, but package install disabled through {0}\n".format(PLD_CONFIG_FN))
-+            return 1
+@@ -587,7 +706,12 @@
+         if args.dry_run:
+             return 1
+         else:
+-            return update_packages(needed)
++            if pld_config_enabled("INSTALL_PACKAGES", True):
++                print("Installing packages as configured through {0}...".format(PLD_CONFIG_FN))
++                return updatePackages( needed )
++            else:
++                print("\nWARNING: Dependencies missing, but package install disabled through {0}\n".format(PLD_CONFIG_FN))
++                return 1
      else:
          return 0
  
This page took 0.100255 seconds and 4 git commands to generate.