public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin-apps@cygwin.com
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Subject: Re: Question about 'provides' and emacs packaging
Date: Wed, 6 Oct 2021 08:01:05 -0400	[thread overview]
Message-ID: <1e97fce0-593a-e8a6-cefe-fa6d8a1c4ed4@cornell.edu> (raw)
In-Reply-To: <871r4zba8j.fsf@Rainer.invalid>

On 10/5/2021 2:24 PM, Achim Gratz wrote:
> Ken Brown via Cygwin-apps writes:
>> There are currently five emacs packages: emacs-common, emacs,
>> emacs-X11, emacs-w32, and emacs-lucid.  The first includes things that
>> are needed by each of the other four, and those four each include an
>> emacs binary.  The binary in the emacs package is
>> /usr/bin/emacs-nox.exe.  The other packages contain
>> /usr/bin/emacs-X11.exe, and so on.
>>
>> This way of naming the packages doesn't really reflect the contents of
>> the emacs package.  It also means that anyone who installs emacs gets
>> emacs-nox.exe, even if they plan to use one of the other three
>> binaries.
>>
>> I would rather rename the current emacs-common package to emacs and
>> the current emacs package to emacs-nox.  But then the new emacs would
>> have to have a way of requiring the installation of at least one of
>> emacs-nox, emacs-X11, emacs-w32, or emacs-lucid.  Is there any way to
>> do this with our current setup machinery?
> 
> I don't think we have the transaction capability that would be necessary
> to specify that the meaning of an already existing package name (two,
> actually) changes in this manner.  You might have to use new package
> names and place the appropriate obsoletions w.r.t. old names instead.
> 
>> My idea three years ago was to have the new emacs package require a
>> "feature" called, for instance, emacs-bin, and then have each of
>> emacs-nox, emacs-X11, emacs-w32, emacs-lucid "provide" that feature.
> 
> I have no idea if multiple packages can provide the same feature. It's
> worth trying if it does what you want (you must pick at least one of
> those).

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.

I've only tested setup so far, not calm.  Jon, if you're reading this, does calm 
allow 'requires' and 'provides' to contain arbitrary names that are not package 
names?

Ken

  reply	other threads:[~2021-10-06 12:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 15:51 Ken Brown
2021-10-05 16:58 ` Brian Inglis
2021-10-05 18:08   ` Ken Brown
2021-10-05 18:24 ` Achim Gratz
2021-10-06 12:01   ` Ken Brown [this message]
2021-10-06 12:18     ` ASSI
2021-10-06 16:23     ` Jon Turney
2021-10-06 20:22       ` Jon Turney
2021-10-06 20:58         ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e97fce0-593a-e8a6-cefe-fa6d8a1c4ed4@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin-apps@cygwin.com \
    --cc=jon.turney@dronecode.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).