Acknowledgement sent
to Raphaël Hertzog <hertzog@debian.org>:
New Bug report received and forwarded. Copy sent to hertzog@debian.org, joss@debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>.
(Mon, 13 Apr 2015 07:06:06 GMT) (full text, mbox, link).
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: u-a: allow to override the priorities of alternatives at a system-wide level
Date: Mon, 13 Apr 2015 09:02:26 +0200
Package: dpkg
Version: 1.17.24
Severity: wishlist
User: devel@kali.org
Usertags: origin-kali
In the context a Debian derivative, you might want to tweak the priorities
of alternatives because you make different choices about what should be
the default implementation of something (my immediate use case was to
change the default desktop session which is managed with x-session-manager).
Yet changing the priority of an alternative requires forking the package
because the priority is hardcoded in maintainer scripts. It would be nice
if update-alternatives could look up some system-wide override data and
use those values when they exist instead of the value provided on the
command line.
This would also make it easier to change defaults at a company-wide level
while still leaving the possibility for each user to change the
alternative to point to something else.
I imagine it could take the form of a directory
/etc/alternatives/priorities.d/ (or
/etc/dpkg/update-alternatives/priorities.d) with files containing simple
"<name> <path> <priority>" lines (where <name> is the name of the symlink
in /etc/alternatives/ and <path> is the full path of the alternative in the
master link).
Cheers,
-- System Information:
Debian Release: 8.0
APT prefers squeeze-lts
APT policy: (500, 'squeeze-lts'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages dpkg depends on:
ii libbz2-1.0 1.0.6-7+b3
ii libc6 2.19-17
ii liblzma5 5.1.1alpha+20120614-2+b3
ii libselinux1 2.3-2
ii tar 1.27.1-2+b1
ii zlib1g 1:1.2.8.dfsg-2+b1
dpkg recommends no packages.
Versions of packages dpkg suggests:
ii apt 1.0.9.7
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>: Bug#782493; Package dpkg.
(Mon, 28 Oct 2024 10:15:01 GMT) (full text, mbox, link).
Acknowledgement sent
to "Barak A. Pearlmutter" <barak@cs.nuim.ie>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>.
(Mon, 28 Oct 2024 10:15:01 GMT) (full text, mbox, link).
To give an example of where this is needed, the package
microsoft-edge-beta
available from the non-debian repo
$ cat /etc/apt/sources.list.d/microsoft-edge-beta.list
deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main
installs an alternative:
$ update-alternatives --display x-www-browser
x-www-browser - auto mode
link best version is /usr/bin/microsoft-edge-beta
link currently points to /usr/bin/microsoft-edge-beta
link x-www-browser is /usr/bin/x-www-browser
slave x-www-browser.1.gz is /usr/share/man/man1/x-www-browser.1.gz
/usr/bin/epiphany-browser - priority 85
slave x-www-browser.1.gz: /usr/share/man/man1/epiphany-browser.1.gz
/usr/bin/firefox - priority 70
slave x-www-browser.1.gz: /usr/share/man/man1/firefox.1.gz
/usr/bin/microsoft-edge-beta - priority 150
and another
$ update-alternatives --display gnome-www-browser
gnome-www-browser - auto mode
link best version is /usr/bin/microsoft-edge-beta
link currently points to /usr/bin/microsoft-edge-beta
link gnome-www-browser is /usr/bin/gnome-www-browser
slave gnome-www-browser.1.gz is /usr/share/man/man1/gnome-www-browser.1.gz
/usr/bin/epiphany-browser - priority 85
slave gnome-www-browser.1.gz: /usr/share/man/man1/epiphany-browser.1.gz
/usr/bin/firefox - priority 70
slave gnome-www-browser.1.gz: /usr/share/man/man1/firefox.1.gz
/usr/bin/microsoft-edge-beta - priority 150
It is using priority 150 (!) while firefox/sid is using priority 70.
The epiphany-browser has priority 85, which I think is a little bit of
overreach, but whatever. And at least there's a place to discuss it:
https://bugs.debian.org/824613
I would classify this as more a deliberate attack than a bug. But the
MS Edge package is not distributed by Debian, so there's not really
anything we can do about it.
Ideally, we'd have a mechanism to override priorities from random
out-of-line packages. (And maybe pre-populate it with offenders like
this particular one. In this case, I'd override to -100 like the
update-alternatives(1) example for /bin/ed.)
(Why do I have MS Edge installed? Other obnoxious systems I need to
use require it.)
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.