kicad-install.sh aborts when yum and apt-get not installed

Bug #1337450 reported by Dmitry Bravikov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Won't Fix
Undecided
Unassigned

Bug Description

If yum and apt-get not installed, kicad-install.sh aborts on following line in function install_prerequisites():

PM=$( command -v yum || command -v apt-get )

"else" is not executed.

It happens because bash is invoked with -e.

I use Arch Linux.

bash --version
GNU bash, version 4.3.18(1)-release (i686-pc-linux-gnu)

description: updated
Revision history for this message
Nick Østergaard (nickoe) wrote :

I don't think it was intended to, neither do I think it should. You can simply use AUR and install kicad-bzr and kicad-library-git and maybe kicad-pretty-git if you want the footprints whilst offline.

Revision history for this message
Nick Østergaard (nickoe) wrote :

Add || true to fix bash -e mode to exit too early

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Since Arch Linux is the target platform. Wouldn't it make more sense to add || command -v pacman in the package manager test and then use pacman to install the build dependencies? Please keep in mind, that is the intention of this script. It is not just to build kicad. If we want to provide a build only script and let the user perform their own package management, then maybe it makes more sense to split out the build part of the script from the package management part.

Revision history for this message
Nick Østergaard (nickoe) wrote :

Hi Wayne

Well it could be done, but IMHO I think an arch linux user is better off using the kicad-bzr package on AUR rather than kicad-install.sh.

What do you mean by the intention of the script? Is it that it primarily should prepare kicad depends on the system, and secondarily build and install?

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1337450] Re: kicad-install.sh aborts when yum and apt-get not installed

On 11/16/2014 8:54 AM, Nick Østergaard wrote:
> Hi Wayne
>
> Well it could be done, but IMHO I think an arch linux user is better off
> using the kicad-bzr package on AUR rather than kicad-install.sh.
>
> What do you mean by the intention of the script? Is it that it primarily
> should prepare kicad depends on the system, and secondarily build and
> install?
>
If I am correct, the purpose of the script is to install the build
dependencies on your system and build kicad from source. If you add ||
true to the package manager check, it will ignore installing the build
dependencies on platforms that are not Debian or Red Hat based and
attempt to build kicad from source. I don't see this being a good
thing. The developers of this project have spent way too much time baby
sitting folks trying to build kicad using this script. I see this
change as making things worse in that regard, not better. That is why I
suggested checking for pacman and using it to install the build
dependencies. I don't want to have to walk someone through installing
every missing build dependency to build kicad on non Debian and Red Hat
based systems.

Revision history for this message
Nick Østergaard (nickoe) wrote :

I shall not decide on this, but if you want to add pacman to the depends installing, the depends can be found in the AUR package. See the hyperlink below.

https://aur.archlinux.org/packages/ki/kicad-bzr/PKGBUILD

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 11/16/2014 10:40 AM, Nick Østergaard wrote:
> I shall not decide on this, but if you want to add pacman to the depends
> installing, the depends can be found in the AUR package. See the
> hyperlink below.
>
> https://aur.archlinux.org/packages/ki/kicad-bzr/PKGBUILD
>
If you were going to do it that way, the install script would not be the
way to go. Just checkout the PKGBUILD file, run makepkg, and install
your shiny new package with pacman. That's also how you should build
kicad windows with msys2.

Revision history for this message
Nick Østergaard (nickoe) wrote :

That is what I mean. I don't think we need to handle pacman in this script. Archlinux already has a mechanism to "support" building latest and installing it. Therefor there is no need for kicad-install.sh on arch.

I do realise that the patch I proposed is stupid.

Can we call this a "Won't fix"?

xzcvczx (xzcvczx)
Changed in kicad:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.