setup and 'provides:'

Ken Brown kbrown@cornell.edu
Mon Oct 8 16:24:00 GMT 2018


On 10/8/2018 11:17 AM, cyg Simple wrote:
> On 10/8/2018 11:05 AM, Ken Brown wrote:
>> Here's an example (modeled on what Fedora does): Cygwin has four
>> packages that provide emacs binaries: emacs, emacs-X11, emacs-lucid, and
>> emacs-w32.  Users can install any or all of these if they want to be
>> able to run emacs.  The differences are in the UI.  These packages don't
>> conflict with one another.
>>
> 
> How do they overcome the conflict?

They use different names for the emacs binaries: emacs-nox.exe, 
emacs-X11.exe, emacs-lucid.exe, and emacs-w32.exe.  The "alternatives" 
system then creates a symlink /usr/bin/emacs that resolves to whichever 
binary the user wants to use by default.  It's been this way for many 
years, with no problems.

>> If some other package requires an emacs binary, I would like it to be
>> able to require "emacs-bin".  [This plays the role of "foo" in my test
>> case.]  Then I would like to be able to say that all four emacs packages
>> above provide "emacs-bin".
>>
> 
> That's fine but how do an installation of multiple emacs-bin not create
> a conflict?

"emacs-bin" is not a thing that can be installed.  It's simply a name 
for a requirement, and that requirement can be met by installing any 
package that declares that it provides "emacs-bin".  At least that's my 
understanding of how it works in package managers like rpm.  As I said 
at the very beginning, it's quite possible that I'm misunderstanding how 
'provides:' is supposed to work.

Ken


More information about the Cygwin-apps mailing list