Acknowledgement sent
to Raphael Hertzog <[email protected]>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <[email protected]>.
(Fri, 13 Jul 2012 14:09:10 GMT) (full text, mbox, link).
Package: dpkg-dev
Version: 1.16.7
Severity: wishlist
User: [email protected]
Usertags: dpkg-vendor
The --derives-from command works but when you have multiple levels of
derivatives, it imposes you to order your checks in the correct order
to have the expected behaviour. It's also not reliable in the case
where the derivative relationships are symmetric (i.e. like RedHat and Fedora
which are evolving in parallel but building on each another). This
symmetric relationship is explicitely allowed in the ID_LIKE field
of /etc/os-release.
Therefore I suggest to implement a "dpkg-vendor --select-closest <distro1>
<distro2> ..." command that would compare all the listed distributions and
that would return the distribution which is closest to the current
distribution. This enables us to do:
TARGET_VENDOR := $(shell dpkg-vendor --select-closest debian ubuntu mint)
ifeq($(TARGET_VENDOR),mint)
# Mint specific options
else ifeq($(TARGET_VENDOR),ubuntu)
# Ubuntu specific options
else ifeq($(TARGET_VENDOR),debian)
# Debian specific options
endif
This command can be reliably implemented with /etc/dpkg/origin/* and with
/etc/os-release since the latter orders the derivatives listed in ID_LIKE
from the closest to the furthest.
Cheers,
--
Raphaël Hertzog ◈ Debian Developer
Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/
Changed Bug title to 'dpkg-vendor: implement --select-closest command' from 'dpkg-vendor: implement --select-closest command versions'
Request was from Raphaël Hertzog <[email protected]>
to [email protected].
(Fri, 13 Jul 2012 14:30:04 GMT) (full text, mbox, link).
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/.