Hello, On Thu 01 Apr 2021 at 01:59PM -07, Russ Allbery wrote:
> diff --git a/policy/ch-customized-programs.rst > b/policy/ch-customized-programs.rst > index 747df56..27abebd 100644 > --- a/policy/ch-customized-programs.rst > +++ b/policy/ch-customized-programs.rst > @@ -93,21 +93,30 @@ alternative should have a slave alternative for > ``/usr/share/man/man1/pager.1.gz`` pointing to the corresponding manual > page. > > -If it is very hard to adapt a program to make use of the EDITOR or PAGER > -variables, that program may be configured to use > -``/usr/bin/sensible-editor`` and ``/usr/bin/sensible-pager`` as the > -editor or pager program respectively. These are two scripts provided in > -the sensible-utils package that check the EDITOR and PAGER variables and > +Packages that register as an alternative for ``/usr/bin/editor`` should > +also provide the virtual package ``editor`` by including it in the > +``Provides`` control field. The package providing the current default > +editor for the Debian base system, and only that package, should also > +provide the ``default-editor`` virtual package. Packages that call > +``editor`` directly (not via ``sensible-editor`` or the EDITOR environment > +variable) should depend on ``default-editor | editor``. > + > +Programs may assume that ``/usr/bin/pager`` is available as a fallback > +without adding an explicit package dependency. There is no ``pager`` > +virtual package. > + > +If it is difficult to adapt a program to use the EDITOR or PAGER > +variables, that program may instead be configured to use > +``/usr/bin/sensible-editor`` and ``/usr/bin/sensible-pager`` as the editor > +or pager program respectively. These are scripts provided by the > +``sensible-utils`` package that check the EDITOR and PAGER variables and > launch the appropriate program, and fall back to ``/usr/bin/editor`` and > -``/usr/bin/pager`` if the variable is not set. > +``/usr/bin/pager`` if the variable is not set. Packages using these > +scripts should declare an appropriate dependency on ``sensible-utils``. > > A program may also use the VISUAL environment variable to determine the > user's choice of editor. If it exists, it should take precedence over > -EDITOR. This is in fact what ``/usr/bin/sensible-editor`` does. > - > -It is not required for a package to depend on ``editor`` and ``pager``, > -nor is it required for a package to provide such virtual > -packages. [#]_ > +EDITOR. This is also what ``/usr/bin/sensible-editor`` does. > > .. _s-web-appl: > > @@ -573,10 +582,6 @@ installed in ``/usr/share/man/man6``. > portion is handled internally by the package system based on the os > and cpu. > > -.. [#] > - The Debian base system already provides an editor and a pager > - program. > - > .. [#] > If it is not possible to establish both locks, the system shouldn't > wait for the second lock to be established, but remove the first > diff --git a/virtual-package-names-list.yaml b/virtual-package-names-list.yaml > index 2a9857a..6c0b59e 100644 > --- a/virtual-package-names-list.yaml > +++ b/virtual-package-names-list.yaml > @@ -100,6 +100,14 @@ virtualPackages: > > # System > > + - name: default-editor > + description: default base system /usr/bin/editor > + alternatives: > + - /usr/bin/editor > + - name: editor > + description: suitable /usr/bin/editor > + alternatives: > + - /usr/bin/editor > - name: flexmem > description: anything that can access flexible memory via the OBEX > Protocol > - name: foomatic-data > @@ -457,3 +465,7 @@ virtualPackages: > # Added default-dbus-session-bus > # 15 Feb 2019 Added logind > # Added default-logind > +# > +# Russ Allbery: > +# 01 Apr 2021 Added editor > +# Added default-editor Well, as you might guess, I prefer the "very hard" and "make use of" wording, but nevertheless: seconded :) Thank you for the patch. -- Sean Whitton
signature.asc
Description: PGP signature