[arch-dev-public] [core] packages and install scripts

Pierre Schmitz pierre at archlinux.de
Thu Oct 4 02:03:55 EDT 2012


I thought this might be interesting for everyone, so I send a mail here
instead of filing a bug report. If you are using install scripts in your
packages, make sure the commands you are calling are actually installed
before by adjusting your dependencies. Alternatively it might be needed
to test if a certain command is available and silently abort if it is

I found this issue in the iputils install script which fails on a new
install as the vercmp command is not found:

  if [ "$(vercmp $2  20101006-3)" -le 0 ]; then
    echo " >> Traceroute is now provided by core/traceroute"

This might be new for some of us, but yes: vercmp is part of the pacman
package, but before this is available in a new install 94 other packages
get installed, among these is iputils.

In general these issues can be solved by adding the needed dependencies
to the package. But you need to be really careful to avoid circular or
other insane dependencies. In this case adding pacman as a dependency is
a bad idea. I would suggest to either remove this statement completely
as it just adds useless noise or at least check if vercmp is available;
if not we can assume no previous version of iputils was installed.

These issues usually affect only packages in [core], especially those
in the base group. A new Arch install is created by extracting those
packages into an almost empty directory. That's why their install
scripts cannot assume anything that is not listed in their dependencies
is available yet.



Pierre Schmitz, https://pierre-schmitz.com

More information about the arch-dev-public mailing list