Skip to content

build: patch .deb scripts for headless and WSL compatibility#346

Merged
rainxchzed merged 2 commits intomainfrom
linux-build-fix
Mar 21, 2026
Merged

build: patch .deb scripts for headless and WSL compatibility#346
rainxchzed merged 2 commits intomainfrom
linux-build-fix

Conversation

@rainxchzed
Copy link
Member

@rainxchzed rainxchzed commented Mar 21, 2026

  • Add a new step to the Linux desktop build workflow to modify .deb installer scripts.
  • Patch postinst, prerm, and postrm scripts to make xdg-utils commands non-fatal.
  • Append || true to calls for xdg-desktop-menu, xdg-icon-resource, and xdg-mime.
  • Ensure package installation and removal succeed in headless environments, Docker containers, and WSL where desktop services may be unavailable.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced Linux desktop package installer robustness by ensuring desktop integration operations during installation do not cause the installation process to fail.

- Add a new step to the Linux desktop build workflow to modify `.deb` installer scripts.
- Patch `postinst`, `prerm`, and `postrm` scripts to make `xdg-utils` commands non-fatal.
- Append `|| true` to calls for `xdg-desktop-menu`, `xdg-icon-resource`, and `xdg-mime`.
- Ensure package installation and removal succeed in headless environments, Docker containers, and WSL where desktop services may be unavailable.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4ce24512-4373-49ab-8810-968c1afd5de0

📥 Commits

Reviewing files that changed from the base of the PR and between 2b3da47 and f094c1d.

📒 Files selected for processing (1)
  • .github/workflows/build-desktop-platforms.yml

Walkthrough

A new Linux CI step is added to post-process generated .deb packages by extracting them, appending || true to maintainer script commands for XDG utilities to prevent installation failures, then repacking. Windows and macOS workflows remain unaffected.

Changes

Cohort / File(s) Summary
Debian Package Post-Processing
.github/workflows/build-desktop-platforms.yml
Adds a new Linux CI step that extracts, modifies, and repacks .deb artifacts. Appends || true to maintainer script invocations of XDG utilities (xdg-desktop-menu, xdg-icon-resource, xdg-mime) in DEBIAN/postinst, prerm, and postrm files to ensure non-fatal execution during package installation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 With dpkg and scripts, I hop and extract,
Appending true to XDG tracts,
Debian packages now survive with grace,
No installation fails in this place!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'build: patch .deb scripts for headless and WSL compatibility' directly and clearly describes the main change: patching Debian package scripts for better compatibility in headless/WSL environments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch linux-build-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rainxchzed rainxchzed merged commit 67bb54d into main Mar 21, 2026
1 check passed
@rainxchzed rainxchzed deleted the linux-build-fix branch March 21, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant