internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: lutris/lutris

Issue:
Game Sync Bug (Proton,Steamworks Banner etc.)
If you ever install a Winesteam Game or use Steam Play with Proton from the beta branch, Lutris scan some necessary Steam Applications and show it as Gamebanner:

![auswahl_001](https://user-images.githubusercontent.com/22080674/44949553-645aba00-ae34-11e8-932c-bbad2f16c833.png)

this happen cause the Application have a SteamID:

in this case:
Proton 3.7 Beta: 930400
Proton 3.7: 858280

(also Steamworks SDK from Wine-Steam have a ID, but i dont have it installed atm)

As a User, we can "delete" it via the Context Menu from the Lutris Main Window but it dont work permanent, cause after a restart it get again synced and shown.

Pls to fix :+1: 






Discussion:

Resolving patch:
diff --git a/lutris/services/steam.py b/lutris/services/steam.py
--- a/lutris/services/steam.py
+++ b/lutris/services/steam.py
@@ -228,6 +228,7 @@ def sync_appmanifest_state(appmanifest_path, name=None, slug=None):
 def sync_with_lutris(platform='linux'):
     steamapps_paths = get_steamapps_paths()
     steam_games_in_lutris = pga.get_games_where(steamid__isnull=False, steamid__not='')
+    proton_ids = ["858280", "930400"]
     steamids_in_lutris = set([str(game['steamid']) for game in steam_games_in_lutris])
     seen_ids = set()  # Set of Steam appids seen while browsing AppManifests
 
@@ -237,7 +238,7 @@ def sync_with_lutris(platform='linux'):
             steamid = re.findall(r'(\d+)', appmanifest_file)[0]
             seen_ids.add(steamid)
             appmanifest_path = os.path.join(steamapps_path, appmanifest_file)
-            if steamid not in steamids_in_lutris:
+            if steamid not in steamids_in_lutris and steamid not in proton_ids:
                 # New Steam game, not seen before in Lutris,
                 if platform != 'linux':
                     # Windows games might require additional steps.


Test patch:
Repository: lutris/lutris

Issue:
Add copy command as an alias for merge
There's no way to copy a single downloaded file to two directories currently. So I end up having to do this:

```
- move:
    dst: $GAMEDIR/Tools/Windows/x64/discord-rpc.dll
    src: $rpc
- execute:
    command: cp "$GAMEDIR/Tools/Windows/x64/discord-rpc.dll" "$GAMEDIR/Tools/Windows/x86"


Discussion:
As far as I know the [merge](https://github.com/lutris/lutris/blob/master/docs/installers.rst#copying-and-merging-directories) command copies files.
I'll just alias copy to merge :D
Oh, I thought merge was like `move` but without having to worry about file names. Good to know.
Should we really make an alias for that? Having two commands do the same thing might cause some confusion.
it just need to be documented, it's a pretty common thing to do

Resolving patch:
diff --git a/lutris/installer/commands.py b/lutris/installer/commands.py
--- a/lutris/installer/commands.py
+++ b/lutris/installer/commands.py
@@ -263,6 +263,10 @@ def merge(self, params):
             return
         self._killable_process(system.merge_folders, src, dst)
 
+    def copy(self, params):
+        """Alias for merge"""
+        self.merge(params)
+
     def move(self, params):
         """Move a file or directory into a destination folder."""
         self._check_required_params(['src', 'dst'], params, 'move')


Test patch:
Repository: lutris/lutris

Issue:
DXVK versions not updating when dxvk directory is missing
When `~/.local/share/lutris/runtime/dxvk/` is not present (because a user never used dxvk before), Lutris fails to create `dxvk_versions.json` because the parent directory does not exist, which leads to Lutris showing the (outdated) fallback DXVK versions. A workaround is to create the missing directory manually and to restart Lutris.

![Missing DXVK versions](https://user-images.githubusercontent.com/40150792/45500181-5c790f00-b77e-11e8-9f09-2cbf351ae5eb.png)


Discussion:
Your pull request does not fix the missing directory? Lutris should create this directory during installation. 
No, #1107 does not fix this. It just fixed a typo.
I personally think that creating dxvk_versions.json in the runtime directory rather than the dxvk directory would be easier.

Resolving patch:
diff --git a/lutris/gui/application.py b/lutris/gui/application.py
--- a/lutris/gui/application.py
+++ b/lutris/gui/application.py
@@ -29,6 +29,7 @@
 
 from lutris import pga
 from lutris.config import check_config
+from lutris.util.dxvk import init_dxvk_versions
 from lutris.platforms import update_platforms
 from lutris.gui.dialogs import ErrorDialog, InstallOrPlayDialog
 from lutris.migrations import migrate
@@ -52,6 +53,7 @@ def __init__(self):
         gettext.textdomain("lutris")
 
         check_config()
+        init_dxvk_versions()
         migrate()
         update_platforms()
 
diff --git a/lutris/util/dxvk.py b/lutris/util/dxvk.py
--- a/lutris/util/dxvk.py
+++ b/lutris/util/dxvk.py
@@ -5,7 +5,7 @@
 import shutil
 import urllib.request
 
-from lutris.settings import RUNTIME_DIR
+from lutris.settings import RUNTIME_DIR, DATA_DIR
 from lutris.util.log import logger
 from lutris.util.extract import extract_archive
 from lutris.util.downloader import Downloader
@@ -14,7 +14,13 @@
 
 CACHE_MAX_AGE = 86400  # Re-download DXVK versions every day
 DXVK_TAGS_URL = "https://api.github.com/repos/doitsujin/dxvk/tags"
-
+DXVK_VERSIONS = [
+    "0.71", "0.70", "0.65",
+    "0.64", "0.63", "0.62",
+    "0.54", "0.53", "0.52",
+    "0.42", "0.31", "0.21"
+]
+DXVK_LATEST, DXVK_PAST_RELEASES = DXVK_VERSIONS[0], DXVK_VERSIONS[1:]
 
 def get_dxvk_versions():
     """Get DXVK versions from GitHub"""
@@ -36,18 +42,12 @@ def get_dxvk_versions():
 
     return dxvk_versions
 
-
-try:
-    DXVK_VERSIONS = get_dxvk_versions()
-except Exception as ex:  # pylint: disable= broad-except
-    logger.error(ex)
-    DXVK_VERSIONS = [
-        "0.71", "0.70", "0.65",
-        "0.64", "0.63", "0.62",
-        "0.54", "0.53", "0.52",
-        "0.42", "0.31", "0.21"
-    ]
-DXVK_LATEST, DXVK_PAST_RELEASES = DXVK_VERSIONS[0], DXVK_VERSIONS[1:]
+def init_dxvk_versions():
+    try:
+        DXVK_VERSIONS = get_dxvk_versions()
+    except Exception as ex:  # pylint: disable= broad-except
+        logger.error(ex)
+    DXVK_LATEST, DXVK_PAST_RELEASES = DXVK_VERSIONS[0], DXVK_VERSIONS[1:]
 
 
 class DXVKManager:


Test patch:
Repository: lutris/lutris

Issue:
Change "Import Games" to something more clear (like "Configure library importing")
I personally feel like the current name for that menu is confusing, misleading and does't represent its actual purpose. I personally think something like "Configure library importing" will describe the menu much better, but if you disagree, any suggestions are appreciated.


Discussion:
"Runner synchronization"?
The menu is for configuring syncing of libraries from Steam and other stuff like that, runners are not really relevant here.

Resolving patch:
diff --git a/lutris/gui/sync.py b/lutris/gui/sync.py
--- a/lutris/gui/sync.py
+++ b/lutris/gui/sync.py
@@ -59,7 +59,7 @@ def on_switch_changed(self, switch, data):
 class SyncServiceDialog(Gtk.Dialog):
 
     def __init__(self, parent=None):
-        Gtk.Dialog.__init__(self, title="Import local games", parent=parent)
+        Gtk.Dialog.__init__(self, title="Configure local game import", parent=parent)
         self.connect("delete-event", lambda *x: self.destroy())
         self.set_border_width(10)
         self.set_size_request(512, 0)
@@ -68,8 +68,8 @@ def __init__(self, parent=None):
         self.get_content_area().add(box_outer)
 
         description_label = Gtk.Label()
-        description_label.set_markup("You can import games from local game sources, \n"
-                                     "you can also choose to sync everytime Lutris starts")
+        description_label.set_markup("You can choose which local game sources will get synced each\n"
+                                     "time Lutris starts, or launch an immediate import of games.")
         box_outer.pack_start(description_label, False, False, 5)
 
         separator = Gtk.Separator()


Test patch:
Repository: lutris/lutris

Issue:
Always show scrollbar for notes
It's not really evident that there are more notes under these unless you hover over them. Always showing the scrollbar, when it exceeds in length, would be better practice.

**Shown:**

Do not sign-in when prompted. Close Origin and wait for the installation to finish then you can relaunch and sign-in.

Disable Origin In-Game just in case.

Make sure "Disable Lutris runtime" is unchecked in the game's system options tab or else download will fail.

**Hidden:**

Should your download pause at 22% press the <a href="https://i.imgur.com/8Vv0bva.png">play icon</a> until it resumes downloading.


![screenshot from 2018-07-01 15-03-23](https://user-images.githubusercontent.com/15083452/42139292-efeb026c-7d3f-11e8-8fae-cf96c0af5810.png)



Discussion:

Resolving patch:
diff --git a/lutris/gui/installerwindow.py b/lutris/gui/installerwindow.py
--- a/lutris/gui/installerwindow.py
+++ b/lutris/gui/installerwindow.py
@@ -239,6 +239,7 @@ def _create_label(text):
         except AttributeError:
             logger.debug("set_propagate_natural_height not available")
         notes_scrolled_area.set_min_content_height(100)
+        notes_scrolled_area.set_overlay_scrolling(False)
         notes_scrolled_area.add(self.notes_label)
         self.installer_choice_box.pack_start(notes_scrolled_area, True, True, 10)
 


Test patch:
Repository: lutris/lutris

Issue:
Executable's path is not fully displayed
How to reproduce:
1) Get master version of Lutris
2) Install a new game
3) Get a path to the executable that is not full (it only displays the path inside prefix, in this example it should have `/home/USERNAME/Games/overwatch` first)
![image](https://user-images.githubusercontent.com/10602045/47195279-e0b54800-d363-11e8-9184-f00e68823cab.png)
Despite this, it launches just fine.
I guess it was caused both by https://github.com/lutris/lutris/pull/1176 and https://github.com/lutris/lutris/commit/126453255d5a8fd6026507bd1f8ffb90d83f8e71


Discussion:

Resolving patch:
diff --git a/lutris/gui/config_boxes.py b/lutris/gui/config_boxes.py
--- a/lutris/gui/config_boxes.py
+++ b/lutris/gui/config_boxes.py
@@ -356,6 +356,8 @@ def generate_file_chooser(self, option, path=None):
             # If path is relative, complete with game dir
             if not os.path.isabs(path):
                 path = os.path.expanduser(path)
+                if not os.path.isabs(path):
+                    path = os.path.join(self.game.directory, path)
             file_chooser.entry.set_text(path)
 
         file_chooser.set_valign(Gtk.Align.CENTER)


Test patch:
Repository: lutris/lutris

Issue:
Changing configuration with "Installed games first" sorting option puts the game at the bottom
This is quite weird behavior that should be fixed.
![peek 2018-10-13 15-50](https://user-images.githubusercontent.com/10602045/46905682-cb719100-ceff-11e8-87e2-2c468d122e6a.gif)



Discussion:
@AlexanderRavenheart please take a look as this is from your Pull Request
Is it DXVK related or is it affected by any change in a runner's configuration?
Any change. Doesn't have to be DXVK.

Resolving patch:
diff --git a/lutris/gui/gameviews.py b/lutris/gui/gameviews.py
--- a/lutris/gui/gameviews.py
+++ b/lutris/gui/gameviews.py
@@ -118,12 +118,11 @@ def filter_view(self, model, _iter, filter_data=None):
 
     def sort_view(self, show_installed_first=False):
         self.show_installed_first = show_installed_first
+        self.store.set_sort_column_id(COL_NAME, Gtk.SortType.ASCENDING)
+        self.modelfilter.get_model().set_sort_column_id(COL_NAME, Gtk.SortType.ASCENDING)
         if show_installed_first:
             self.store.set_sort_column_id(COL_INSTALLED, Gtk.SortType.DESCENDING)
             self.modelfilter.get_model().set_sort_column_id(COL_INSTALLED, Gtk.SortType.DESCENDING)
-        else:
-            self.store.set_sort_column_id(COL_NAME, Gtk.SortType.ASCENDING)
-            self.modelfilter.get_model().set_sort_column_id(COL_NAME, Gtk.SortType.ASCENDING)
 
     def add_game_by_id(self, game_id):
         """Add a game into the store."""
@@ -186,6 +185,7 @@ def add_game(self, game):
             game['installed_at'],
             installed_at_text
         ))
+        self.sort_view(self.show_installed_first)
 
     def set_icon_type(self, icon_type):
         if icon_type != self.icon_type:


Test patch:
Repository: lutris/lutris

Issue:
Vulkan check will not work on certain distributions
Note that this probably won't work on certain distributions, where this file, for instance, is actually called `/usr/lib/x86_64-linux-gnu/libvulkan.so.1` or similar. Confirmed not working on Linux Mint 19.

_Originally posted by @Vexatos in https://github.com/lutris/lutris/pull/1186_


Discussion:

Resolving patch:
diff --git a/lutris/util/vulkan.py b/lutris/util/vulkan.py
--- a/lutris/util/vulkan.py
+++ b/lutris/util/vulkan.py
@@ -1,5 +1,6 @@
 """Vulkan helper module"""
 import os
+import re
 from enum import Enum
 
 class vulkan_available(Enum):
@@ -8,11 +9,20 @@ class vulkan_available(Enum):
     SIXTY_FOUR = 2
     ALL = 3
 
+def search_for_file(directory):
+    if os.path.isdir(directory):
+        pattern = re.compile(r'^libvulkan\.so')
+        files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))]
+        files = [os.path.join(directory, f) for f in files if pattern.search(f)]
+        if files:
+            return True
+    return False
+
 def vulkan_check():
-    vulkan_lib = os.path.isfile("/usr/lib/libvulkan.so")
-    vulkan_lib32 = os.path.isfile("/usr/lib32/libvulkan.so")
-    vulkan_lib_multi = os.path.isfile("/usr/lib/x86_64-linux-gnu/libvulkan.so")
-    vulkan_lib32_multi = os.path.isfile("/usr/lib32/i386-linux-gnu/libvulkan.so")
+    vulkan_lib = search_for_file("/usr/lib")
+    vulkan_lib32 = search_for_file("/usr/lib32")
+    vulkan_lib_multi = search_for_file("/usr/lib/x86_64-linux-gnu")
+    vulkan_lib32_multi =  search_for_file("/usr/lib32/i386-linux-gnu")
     has_32_bit = vulkan_lib32 or vulkan_lib32_multi
     has_64_bit = vulkan_lib or vulkan_lib_multi
 


Test patch:
Repository: lutris/lutris

Issue:
latest version 0.4.21 thinks i don't have a vulkan loader
Got the new message pop up to say I don't have a Vulkan loader installed. This is on an Ubuntu 18.10 fresh upgrade.

I do:

> liam@liam-main:~$ sudo apt install libvulkan1 libvulkan1:i386 
[sudo] password for liam: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libvulkan1 is already the newest version (1.1.82.0-0ubuntu1).
libvulkan1:i386 is already the newest version (1.1.82.0-0ubuntu1).
0 to upgrade, 0 to newly install, 0 to remove and 5 not to upgrade.

Need more details? Let me know.


Discussion:
issue resolved on master https://github.com/lutris/lutris/pull/1227
@simgaSd seems like it’s actually not

Resolving patch:
diff --git a/lutris/util/vulkan.py b/lutris/util/vulkan.py
--- a/lutris/util/vulkan.py
+++ b/lutris/util/vulkan.py
@@ -1,6 +1,7 @@
 """Vulkan helper module"""
 import os
 import re
+import subprocess
 from enum import Enum
 
 class vulkan_available(Enum):
@@ -9,22 +10,16 @@ class vulkan_available(Enum):
     SIXTY_FOUR = 2
     ALL = 3
 
-def search_for_file(directory):
-    if os.path.isdir(directory):
-        pattern = re.compile(r'^libvulkan\.so')
-        files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))]
-        files = [os.path.join(directory, f) for f in files if pattern.search(f)]
-        if files:
-            return True
-    return False
-
 def vulkan_check():
-    vulkan_lib = search_for_file("/usr/lib")
-    vulkan_lib32 = search_for_file("/usr/lib32")
-    vulkan_lib_multi = search_for_file("/usr/lib/x86_64-linux-gnu")
-    vulkan_lib32_multi =  search_for_file("/usr/lib32/i386-linux-gnu")
-    has_32_bit = vulkan_lib32 or vulkan_lib32_multi
-    has_64_bit = vulkan_lib or vulkan_lib_multi
+    has_64_bit = False
+    has_32_bit = False
+    for line in subprocess.check_output(["ldconfig", "-p"]).splitlines():
+        line = str(line)
+        if 'libvulkan' in line:
+            if 'x86-64' in line:
+                has_64_bit = True
+            else:
+                has_32_bit = True
 
     if not (has_64_bit or has_32_bit):
         return vulkan_available.NONE


Test patch:
Repository: lutris/lutris

Issue:
Log window: lock to the bottom gets lost
Caused by https://github.com/lutris/lutris/pull/1179. From my experience, it happens when there are a lot lines outputted all at once:
![peek 2018-10-18 05-11](https://user-images.githubusercontent.com/10602045/47195406-60dbad80-d364-11e8-9871-8d580796076c.gif)



Discussion:

Resolving patch:
diff --git a/lutris/gui/logwindow.py b/lutris/gui/logwindow.py
--- a/lutris/gui/logwindow.py
+++ b/lutris/gui/logwindow.py
@@ -19,7 +19,9 @@ def autoscroll(self, *args):
         adj = self.get_vadjustment()
         if adj.get_value() == self.scroll_max or self.scroll_max == 0:
             adj.set_value(adj.get_upper() - adj.get_page_size())
-        self.scroll_max = adj.get_upper() - adj.get_page_size()
+            self.scroll_max = adj.get_value()
+        else:
+            self.scroll_max = adj.get_upper() - adj.get_page_size()
 
 
 class LogWindow(Dialog):


Test patch:
Repository: lutris/lutris

Issue:
AttributeError("module 'lutris.runners.wine' has no attribute 'get_wine_version_exe'")
Happens when installing anything with the Wine runner. [Happens on latest commit as of writing.](https://github.com/lutris/lutris/commit/ca9b4d5d3e7e130c000bec6474704a373e352e9c)


Discussion:
I tried this for 2 different wine games and couldn't reproduce it. Which games are broken for you?
This occurred when installing Overwatch, Titanfall 2, and Origin (non DXVK)

On Wed, Oct 31, 2018, 5:24 PM Manuel Vögele <notifications@github.com wrote:

> I tried this for 2 different wine games and couldn't reproduce it. Which
> games are broken for you?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/lutris/lutris/issues/1274#issuecomment-434852882>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/ALJ3MUzQHQDO32i_i7H94-NT4chuwp4Tks5uqhTygaJpZM4YE53t>
> .
>

this `get_wine_version_exe` was missed in recent commit it needs to be moved from util to runners

Resolving patch:
diff --git a/lutris/installer/commands.py b/lutris/installer/commands.py
--- a/lutris/installer/commands.py
+++ b/lutris/installer/commands.py
@@ -14,6 +14,7 @@
 from lutris.util import extract, disks, system
 from lutris.util.fileio import EvilConfigParser, MultiOrderedDict
 from lutris.util.log import logger
+from lutris.util.wine import get_wine_version_exe
 from lutris.util import selective_merge
 
 from lutris.runners import wine, import_task
@@ -377,7 +378,7 @@ def task(self, data):
 
         if runner_name.startswith('wine'):
             if wine_version:
-                data['wine_path'] = wine.get_wine_version_exe(wine_version)
+                data['wine_path'] = get_wine_version_exe(wine_version)
 
         for key in data:
             value = data[key]
diff --git a/lutris/installer/interpreter.py b/lutris/installer/interpreter.py
--- a/lutris/installer/interpreter.py
+++ b/lutris/installer/interpreter.py
@@ -15,6 +15,7 @@
 from lutris.util.log import logger
 from lutris.util.steam import get_app_state_log
 from lutris.util.http import Request
+from lutris.util.wine import get_wine_version_exe
 
 from lutris.config import LutrisConfig, make_game_config_id
 
@@ -829,5 +830,5 @@ def _append_steam_data_to_files(self, runner_class):
 
     def eject_wine_disc(self):
         prefix = self.target_path
-        wine_path = wine.get_wine_version_exe(self._get_runner_version())
+        wine_path = get_wine_version_exe(self._get_runner_version())
         wine.eject_disc(wine_path, prefix)


Test patch:
Repository: lutris/lutris

Issue:
Feral Gamemode not Detected on Fedora 29
The option to enable gamemode on Fedora 29 remains greyed out despite the fact that gamemode is installed. 


Discussion:
Can you provide info on the location of gamemode libraries in your system?
/usr/lib /usr/lib64 and /usr/bin
That reminds me to change gamemodepath we should use ldconfig
@Saroufim would you test this pr https://github.com/lutris/lutris/pull/1323 ?
be sure to have also the 32bit build of gamemode installed for it to actually function properly 

Resolving patch:
diff --git a/lutris/game.py b/lutris/game.py
--- a/lutris/game.py
+++ b/lutris/game.py
@@ -398,7 +398,7 @@ def do_play(self, prelaunched, error=None):
         if gamemode:
             env['LD_PRELOAD'] = ':'.join([
                 path for path in
-                [env.get('LD_PRELOAD'), system.GAMEMODE_PATH]
+                [env.get('LD_PRELOAD'), "/usr/$LIB/libgamemodeauto.so.0"]
                 if path
             ])
 
diff --git a/lutris/sysoptions.py b/lutris/sysoptions.py
--- a/lutris/sysoptions.py
+++ b/lutris/sysoptions.py
@@ -105,8 +105,8 @@ def get_optirun_choices():
     {
         'option': 'gamemode',
         'type': 'bool',
-        'default': bool(system.GAMEMODE_PATH),
-        'condition': bool(system.GAMEMODE_PATH),
+        'default': bool(system.find_lib("libgamemodeauto.so.0")),
+        'condition': bool(system.find_lib("libgamemodeauto.so.0")),
         'label': 'Enable Feral gamemode',
         'help': 'Request a set of optimisations be temporarily applied to the host OS'
     },
diff --git a/lutris/util/system.py b/lutris/util/system.py
--- a/lutris/util/system.py
+++ b/lutris/util/system.py
@@ -46,17 +46,6 @@
 # Detect if system is 64bit capable
 IS_64BIT = sys.maxsize > 2**32
 
-# Path to Feral gamemode library
-GAMEMODE_PATH = next(
-    (
-        path for path in map(
-            lambda x: os.path.join(x, 'libgamemodeauto.so'),
-            ['/usr/lib/x86_64-linux-gnu', '/usr/lib']
-        ) if os.path.exists(path)
-    ),
-    None
-)
-
 
 def execute(command, env=None, cwd=None, log_errors=False, quiet=False, shell=False):
     """
@@ -455,3 +444,18 @@ def is_running(process):
         if re.search(process, x):
             return True
     return False
+
+
+def find_lib(libname):
+    """Returns a list of absoulte paths found in the system of a given library"""
+    lib_paths = []
+    ldconfig_cmd = find_executable("ldconfig")
+    if ldconfig_cmd:
+        ldconfig_out = subprocess.check_output(
+            [ldconfig_cmd, "-p"]).decode("UTF-8")
+        for out in ldconfig_out.splitlines():
+            if libname in out:
+                lib_paths.append(out.split("=> ")[1])
+    else:
+        logger.error("ldconfig not found, can't search for lib %s", libname)
+    return lib_paths


Test patch: