Question about 'provides' and emacs packaging

Ken Brown kbrown@cornell.edu
Wed Oct 6 20:58:43 GMT 2021


On 10/6/2021 4:22 PM, Jon Turney wrote:
> On 06/10/2021 17:23, Jon Turney wrote:
>> On 06/10/2021 13:01, Ken Brown via Cygwin-apps wrote:
>>>
>>> This seems to work, with one caveat.  Suppose package P requires feature f, 
>>> and packages Q, R, S,... provide f.  If the user selects P and one or more of 
>>> Q, R, S,..., setup is happy.  But if the user simply selects P, then 
>>> setup/libsolv will choose among Q, R, S,... the one whose name is 
>>> alphabetically first.  In the emacs case, this would be emacs-lucid, which is 
>>> a stupid default.  The default ought to be emacs-nox.  So I can make it work 
>>> if I call that package emacs-basic instead of emacs-nox.
>>
>> Yeah, I think what's wanted here is for the solver to output a problem with 
>> the choices, rather than picking one.  I'm not sure how to get it to do that.
>>
>> (Ofc, then we need some UI for picking problem solutions, rather than just 
>> always using the default)
> 
> Thinking about this some more, that's probably not how it wants to work, since 
> just installing emacs-common would then require user interaction to solve the 
> problem, rather than just installing emacs-nox as well...

Agreed.

>> (and I'm not sure how we'd encode "emacs-basic" should be the default provider 
>> of "emacs-bin" as the input into the solver; presumably there'd by some scheme 
>> with weights attached to provide names to set the order rather than alphabetic)
> 
> So all that's left is to fix that.
> 
> This is discussed somewhat in [1], and it seems that having emacs-common 
> suggest: or weak-dep: on emacs-nox would cause that to be the preferred 
> provide:r by the solver (in the absence of other provide:ing packages being 
> selected or installed)

Yes, that sounds right...

> So I guess we'd need to add something like that to setup.ini and feed that data 
> into the solver as well.

...but I'm not sure it's worth the trouble unless other package maintainers 
would also have a use for this.  As far as emacs is concerned, I'm fine just 
changing "emacs-nox" to "emacs-basic" so that it's alphabetically first.

Ken


More information about the Cygwin-apps mailing list