aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-19 17:25:48 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-19 17:25:48 -0600
commit5467e210668eb24de9a4429ef0ddcbc6442e8932 (patch)
tree6c672183779c800963d73db5bee6742bf08c65fd /src/plugins
parent6d70b7fa6a9cdf8ea59c7aa98f92249c5a4e0060 (diff)
Add Python init diagnostics, AppImage build system, misc Linux fixes
- python: switch Py_InitializeEx → Py_InitializeFromConfig for explicit error reporting; add dladdr + fprintf diagnostics to trace which DSO Python symbols resolve to and whether Py_IsInitialized succeeds - python: log RTLD_NOLOAD vs fresh-load outcome when promoting libpython to RTLD_GLOBAL - build: add Docker-based AppImage build script (build.sh), update Dockerfile and build-inner.sh for AppImage-only workflow - build: remove Flatpak support entirely; move AppImage metadata (desktop/metainfo/icon) from flatpak/ to data/ - Add Monster Hunter Wilds basic_games plugin - .gitignore: exclude squashfs-root, build-source, flatpak-repo, __pycache__, fomod-plus-settings.ini - Various Linux port fixes across wineprefix, processrunner, proton launcher, FUSE connector, instance manager, download manager, sanitychecks, and NaK Rust paths/runtime_wrap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/rootbuilder.py52
1 files changed, 4 insertions, 48 deletions
diff --git a/src/plugins/rootbuilder.py b/src/plugins/rootbuilder.py
index dcc6706..342e1a0 100644
--- a/src/plugins/rootbuilder.py
+++ b/src/plugins/rootbuilder.py
@@ -57,18 +57,6 @@ def _walk_files(root_dir: str):
yield os.path.join(dirpath, name)
-def _host_cp(src: str, dst: str) -> bool:
- """Copy a file via the host OS (bypasses Flatpak sandbox restrictions)."""
- try:
- result = subprocess.run(
- ["flatpak-spawn", "--host", "cp", "-f", "--reflink=auto", "--", src, dst],
- capture_output=True, timeout=30,
- )
- return result.returncode == 0
- except (subprocess.SubprocessError, OSError):
- return False
-
-
def _ensure_readable(path: str):
"""Ensure a file has owner-read permission (mod archives sometimes strip it)."""
try:
@@ -99,8 +87,6 @@ def _reflink_copy(src: str, dst: str):
return
except OSError as e:
last_err = f"{e.strerror} (errno {e.errno})"
- if _IN_FLATPAK and _host_cp(src, dst):
- return
raise OSError(f"Root Builder: failed to copy {src} -> {dst}: {last_err}")
@@ -113,33 +99,6 @@ def _ensure_writable(path: str):
pass
-_IN_FLATPAK = os.path.exists("/.flatpak-info")
-
-
-def _host_rm(path: str) -> bool:
- """Remove a file via the host OS (bypasses Flatpak sandbox restrictions)."""
- try:
- result = subprocess.run(
- ["flatpak-spawn", "--host", "rm", "-f", "--", path],
- capture_output=True, timeout=10,
- )
- return result.returncode == 0
- except (subprocess.SubprocessError, OSError):
- return False
-
-
-def _host_mv(src: str, dst: str) -> bool:
- """Move a file via the host OS (bypasses Flatpak sandbox restrictions)."""
- try:
- result = subprocess.run(
- ["flatpak-spawn", "--host", "mv", "-f", "--", src, dst],
- capture_output=True, timeout=10,
- )
- return result.returncode == 0
- except (subprocess.SubprocessError, OSError):
- return False
-
-
def _force_remove(path: str) -> bool:
"""Remove a file, fixing permissions if needed. Returns True on success."""
try:
@@ -154,8 +113,6 @@ def _force_remove(path: str) -> bool:
return True
except OSError:
pass
- if _IN_FLATPAK and _host_rm(path):
- return True
qWarning(f"Root Builder: could not remove {path}")
return False
@@ -556,11 +513,10 @@ class RootBuilder(mobase.IPluginTool):
_force_remove(dst)
shutil.move(bak, dst)
except OSError:
- if not (_IN_FLATPAK and _host_mv(bak, dst)):
- qWarning(
- f"Root Builder: could not restore backup "
- f"{bak} -> {dst}"
- )
+ qWarning(
+ f"Root Builder: could not restore backup "
+ f"{bak} -> {dst}"
+ )
# Clean up backup dir
backup_dir = os.path.join(storage, _BACKUP_SUBDIR)