Skip to content

Use cat << EOF to automatically derive suite from /etc/os-release#807

Open
erickeller wants to merge 2 commits intoqgis:mainfrom
erickeller:main
Open

Use cat << EOF to automatically derive suite from /etc/os-release#807
erickeller wants to merge 2 commits intoqgis:mainfrom
erickeller:main

Conversation

@erickeller
Copy link
Copy Markdown

No need to find out the suite for Ubuntu/Debian like system.
using a single sed operation would give the suite, combined with cat << EOF it can be written to the destination file.
The goal of this MR is to simplify the installation on Debian like OS.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 22, 2025

CLA assistant check
All committers have signed the CLA.

@jef-n
Copy link
Copy Markdown
Member

jef-n commented Nov 23, 2025

won't work on sid.

@agiudiceandrea
Copy link
Copy Markdown
Member

I guess it won't work also on Linux Mint.

@erickeller
Copy link
Copy Markdown
Author

won't work on sid.

you are right as the sid currently points to a codename forky:

docker run -ti --rm debian:sid sed -n "s/VERSION_CODENAME=\(.*\)/\1/p" /etc/os-release
Unable to find image 'debian:sid' locally
sid: Pulling from library/debian
63fb544511bd: Pull complete 
Digest: sha256:a4bd9c028b6289c6edcf61b9101de4cf8bb48b2d441139689dd1bd780a7b000b
Status: Downloaded newer image for debian:sid
forky

and your repository dists are labeing it sid -> https://debian.qgis.org/debian/dists/sid/

so I would update the oneliner to: . /etc/os-release; [ "$ID" = "debian" ] && grep -q "/sid" /etc/debian_version && echo "sid" || echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}"

But this would also work for all the above mentioned distribution including sid oldoldstable oldstable and mint

@agiudiceandrea I just installed Linux Mint to ensure it also works there.

I will upate the PR with his one-liner

@Xpirix Xpirix requested a review from timlinux December 15, 2025 11:24
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.

4 participants