FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Development

 
 
LinkBack Thread Tools
 
Old 10-04-2012, 06:03 AM
Pierre Schmitz
 
Default packages and install scripts

Hi,

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
not.

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"
fi

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.

Greetings,

Pierre

--
Pierre Schmitz, https://pierre-schmitz.com
 
Old 10-04-2012, 06:12 AM
Allan McRae
 
Default packages and install scripts

On 04/10/12 16:03, Pierre Schmitz wrote:
> 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.

Umm... the vercmp check is actually completely useless as it does
"vercmp $2 <ver>" and there is no $2 in post_install... it should be in
post_upgrade only.

Allan
 
Old 10-04-2012, 06:20 AM
Pierre Schmitz
 
Default packages and install scripts

Am 04.10.2012 08:12, schrieb Allan McRae:
> On 04/10/12 16:03, Pierre Schmitz wrote:
>> 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.
>
> Umm... the vercmp check is actually completely useless as it does
> "vercmp $2 <ver>" and there is no $2 in post_install... it should be in
> post_upgrade only.

Yes, totally missed that. Of course a vercmp call can only be useful in
post_upgrade and *_remove.

--
Pierre Schmitz, https://pierre-schmitz.com
 
Old 10-04-2012, 12:10 PM
Stéphane Gaudreault
 
Default packages and install scripts

Le 2012-10-04 02:20, Pierre Schmitz a écrit :

Am 04.10.2012 08:12, schrieb Allan McRae:

On 04/10/12 16:03, Pierre Schmitz wrote:

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.

Umm... the vercmp check is actually completely useless as it does
"vercmp $2 <ver>" and there is no $2 in post_install... it should be in
post_upgrade only.

Yes, totally missed that. Of course a vercmp call can only be useful in
post_upgrade and *_remove.

Thank you Pierre and Allan for pointing this. Since the separation of
traceroute was done several months ago, I will just remove the message
and will keep these informations in mind for the future.


Regards,

Stéphane
 
Old 10-05-2012, 06:18 AM
Jan de Groot
 
Default packages and install scripts

On do, 2012-10-04 at 08:10 -0400, Stéphane Gaudreault wrote:

> Thank you Pierre and Allan for pointing this. Since the separation of
> traceroute was done several months ago, I will just remove the message
> and will keep these informations in mind for the future.

Besides that, suggesting packages could also be done with optdepends.
 

Thread Tools




All times are GMT. The time now is 12:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org