Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/linux/ubuntu/install_dependencies.sh: lsb_release might not be installed before it is used in the script #7914

Open
shvaikop opened this issue Mar 31, 2024 · 0 comments

Comments

@shvaikop
Copy link

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

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

No branches or pull requests

1 participant