junest icon indicating copy to clipboard operation
junest copied to clipboard

JuNEST image build: should it accept gcc-multilib?

Open RomanSaveljev opened this issue 8 years ago • 4 comments

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?

RomanSaveljev avatar Oct 08 '15 09:10 RomanSaveljev

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.

fsquillace avatar Oct 08 '15 11:10 fsquillace

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

RomanSaveljev avatar Oct 08 '15 12:10 RomanSaveljev

gcc-multilib provides gcc, so _check_package seems to be incomplete.

Optiligence avatar Oct 20 '15 21:10 Optiligence

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

fsquillace avatar Oct 20 '15 22:10 fsquillace