Skip to content

Conversation

@swenske
Copy link

@swenske swenske commented Dec 20, 2025

Hello 👋

This PR updates the APT package manager detection logic to avoid the Linux Mint wrapper script at /usr/local/bin/apt, which breaks the upgrade simulations. The new logic prefers /usr/bin/apt (the upstream binary), falls back to "apt" in PATH, and only uses "apt-get" as a last resort.

This ensures compatibility across all Debian-like distributions, including Mint, Ubuntu, and Debian, and prevents issues caused by wrapper scripts interfering with package management commands.

Why:
On Linux Mint, the default "apt" is a wrapper that breaks automation. Using the upstream binary directly ensures correct behavior for package updates and upgrades.

before:

time="2025-12-20T08:34:11" level=debug msg="Getting upgradable packages..."
time="2025-12-20T08:34:11" level=warning msg="Failed to get upgrade simulation" error="exit status 1"

after:

time="2025-12-20T10:12:17" level=debug msg="Getting upgradable packages..."
time="2025-12-20T10:12:18" level=debug msg="Parsing apt upgrade simulation output..."
time="2025-12-20T10:12:18" level=debug msg="Found upgradable packages" count=35

Thanks

@9technologygroup
Copy link
Collaborator

Thank you for this @swenske - Your PR is very valid and I will merge it after I push the changes on 1.3.7 :)

Thanks
iby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants