chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] egg make depends


From: Alaric Snell-Pym
Subject: Re: [Chicken-hackers] egg make depends
Date: Tue, 23 Dec 2014 15:24:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130713 Thunderbird/17.0.7

On 22/12/14 20:40, Kon Lovett wrote:
>
>> On Dec 22, 2014, at 12:29 PM, Alexej Magura <address@hidden
>> <mailto:address@hidden>> wrote:
>>
>> Not sure if this is the right mailing list.
>
> address@hidden <mailto:address@hidden> might be
> better since this is more about usage
>
>>
>> Is there a reason why egg meta files don't support make depends, that
>> is depends that are only required during the installation/build
>> process and can be removed afterwards?
>
> Like, say, ‘setup-helper’ ;-)
>
> An annotation like (setup-depends (setup-helper "1.5.2”)) will be
> ignored but serve as documentation; the meta file is just an a-list
> s-expression. With the dependency still needed in ‘depends’.
>
> Would chicken-install remove the setup-dependencies fetched, rather than
> discovered, as part of the install?

It would probably be worth keeping them, to save re-installing them
again for other eggs or reinstalls/upgrades of this one...

It would be possible to make good use of this information, though, by
keeping track of why an egg is installed: what eggs depend upon it (in
the usual sense), and a flag to indicate if it was requested by a user.

So if somebody says "chicken-install foo", then foo is installed (if
it's not already present) and the user-requested flag is set.

If an egg needs to pull in another egg as a general dependency, it's
installed if not already present, then the depending egg is added to the
new egg's depends-upon-this-egg list.

If an egg needs another just as a setup or test dependency, it's
installed if not already present, and no further action taken (it's not
listed as required in future, or requested by a user).

If a user asks to deinstall an egg, then its "requested by user" flag is
cleared, and if it's not required by any other eggs, it's actually
deleted (or if it's deinstalled with -f, then it gets removed
regardless, and anything depending on it is also removed).

This information can then be used to, as a manual step, remove all eggs
that aren't user-wanted or needed by another egg, for instance. Or give
a list of all user-requested eggs so they can be chicken-installed on
another machine to clone the configuration, without ending up installing
eggs that were required for some dependency that is no longer in effect.

But unless people want those more advanced package management features,
tracking the nature of dependency on another egg won't be necessary :-)

ABS

--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]