openframeworks / openframeworks/openFrameworks
scripts/linux/ubuntu/install_dependencies.sh: lsb_release might not be installed before it is used in the script
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hi,
I had an issue with scripts/linux/ubuntu/install_dependencies.sh.
The call to lsb_release in
if [ "$ID" = "elementary" ]; then
# Gets ubuntu base version
RELEASE=$(lsb_release -r -u)
elif [ "$ID" = "linuxmint" ]; then
# Gets ubuntu base version
RELEASE=$(cat /etc/upstream-release/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2)
else
RELEASE=$(lsb_release -r)
fi
returns error if it is not installed and RELEASE ends up being empty resulting in wrong code path later on.
It's not a big deal but I noticed it while trying to automate the build process inside a docker container.
I think it would be a nice idea to try to install the tool with apt-get update && apt-get install -y lsb-release before it is used.
What do you think?
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read scripts/linux/ubuntu/install_dependencies.sh, focusing on where lsb_release is used to set RELEASE before the later code paths. Run the script in an Ubuntu-based container that lacks lsb_release; done means the dependency is available before those checks and RELEASE is no longer empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, ubuntu
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100