Repository navigation
fix(deb): use apt-get instead of apt in setup scripts - #1962
Open
Martini991 wants to merge 1 commit into
Open
Martini991 wants to merge 1 commit into
Martini991 wants to merge 1 commit into
Conversation
apt is meant for interactive use and prints "WARNING: apt does not have a stable CLI interface" when run from a script. apt-get is the stable interface for scripts. Change base_script.sh, regenerate the scripts with generator.sh, and apply the same change to setup_16/18/21/23.x, which the generator no longer produces. The install hints shown to users keep suggesting apt.
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Debian setup scripts run
apt updateandapt install. In non-interactive runs (Docker/Podman builds, CI,curl … | bash -) every call prints:setup_lts.xprints it three times.aptis the interactive front end; apt(8) says:apt-getis not deprecated. #1875 (for #1874) switched the scripts toapton that premise; this PR goes back toapt-getfor the commands the scripts run.Change
scripts/deb/script_generator/base_script.sh:apt update -y→apt-get update -y(twice) andapt install -y …→apt-get install -y …, with the matching comments and error message. Flags are unchanged.setup_20/22/24/25/26.x,setup_lts.xandsetup_current.xwithgenerator.sh. Applied the same change by hand tosetup_16/18/21/23.x, which the generator no longer produces.To install Node.js, run: apt install nodejs -y) are unchanged, since they are for interactive use.The CI workflows still call
apt; I can switch them too if you'd like.Testing
bash -non all changed files.setup_lts.xin a cleandebian:trixie-slimcontainer, before and after:master)nodesource.sources, apt preferences, keyringapt-get install -y nodejsPrepared with the help of Claude Code; I reviewed the change and ran the tests above.