junest
junest copied to clipboard
JuNEST image build: should it accept gcc-multilib?
When I run junest -b
it complains:
Package gcc must be installed
then
$ sudo pacman -S gcc
resolving dependencies...
looking for conflicting packages...
:: gcc and gcc-multilib are in conflict. Remove gcc-multilib? [y/N]
Should it allow for gcc-multilib
?
This is due to the fact that you have installed in your arch gcc-multilib package because you have enable the multilib repository. This is an edge case that I think should be handled manually by just removing the gcc-multilib if not needed.
Or could core.sh
simply fixed like this?
diff --git a/lib/core.sh b/lib/core.sh
index afce54c..ce8055c 100644
--- a/lib/core.sh
+++ b/lib/core.sh
@@ -293,12 +293,13 @@ function delete_env(){
fi
}
-
function _check_package(){
- if ! pacman -Qq $1 > /dev/null
- then
- die "Package $1 must be installed"
- fi
+ local p
+ for p in $@
+ do
+ pacman -Qq $p &>/dev/null && return 0
+ done
+ return 1
}
function _install_from_aur(){
@@ -319,7 +320,7 @@ function build_image_env(){
die "You cannot build with root privileges."
_check_package arch-install-scripts
- _check_package gcc
+ _check_package gcc gcc-multilib
_check_package package-query
_check_package git
gcc-multilib
provides gcc
, so _check_package
seems to be incomplete.
Hi,
I think that the check for gcc
should be substituted with the check for the group base-devel
. In general, the image building process should take into account the presence of all commands that are in base-devel
and not only gcc
.
So we might need to do a check that replaces the gcc one like this:
pacman -Qqg base-devel