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

JuNEST image build: should it accept gcc-multilib? #115

Open
RomanSaveljev opened this issue Oct 8, 2015 · 4 comments
Open

JuNEST image build: should it accept gcc-multilib? #115

RomanSaveljev opened this issue Oct 8, 2015 · 4 comments

Comments

@RomanSaveljev
Copy link

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?

@fsquillace
Copy link
Owner

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.

@RomanSaveljev
Copy link
Author

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

@Optiligence
Copy link

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

@fsquillace
Copy link
Owner

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

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

3 participants