Repository navigation
Ubuntu install_dependencies: detect the version without lsb_release - #8606
Merged
Merged
Conversation
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.
scripts/linux/ubuntu/install_dependencies.shgot the Ubuntu version fromlsb_release -r. Minimal installs don't havelsb_release(Dockerubuntu:22.04/ubuntu:24.04, some cloud images). There the version came out empty, the-lt 12/13/14checks misfired, and the script took the Ubuntu 12/14 branch (CXX_VER=-4.9, the toolchain PPA). apt then failed ong++-4.9, nothing else was installed, and the core build stopped at the pkg-config checks.Before, on stock
ubuntu:24.04:Changes
VERSION_IDfrom/etc/os-release, which the script already sources.lsb_release -r -s -uwhen present, then/etc/upstream-release/lsb-release, thenUBUNTU_CODENAME(bionic, focal, jammy, noble). The fallbacks matter: elementary 7's Docker image haslsb_release, butlsb_release -ureturns nothing there./etc/upstream-release/lsb-release).04isn't read as octal in the numeric tests.No other script under
scripts/linux/useslsb_release.Tested (Docker, arm64). Each run:
install_dependencies.sh -y, thenscripts/linux/download_libs.sh, thenmake -C libs/openFrameworksCompiled/project Release.ubuntu:24.04Done!, no pkg-config errorsubuntu:24.04ubuntu:22.04ubuntu:22.04No
g++-4.9or missing-package lines in any run.Version detection only:
linuxmintd/mint22-amd64Running on ubuntu 24.04(this image reportsID=ubuntu, so it takes the Ubuntu path, not the Mint one)elementary/docker:stable(elementary 7, withlsb_release)Running on ubuntu 22.04elementary/docker:stablewithoutlsb_releaseRunning on ubuntu 22.04(codename)ubuntu:24.04withVERSION_IDremovedbash -npasses. shellcheck (koalaman/shellcheck:stable) reports nothing on the changed lines.