Debian Bug report logs - #681477
dpkg-vendor: implement --select-closest command

version graph

Package: dpkg-dev; Maintainer for dpkg-dev is Dpkg Developers <>; Source for dpkg-dev is src:dpkg.

Reported by: Raphael Hertzog <>

Date: Fri, 13 Jul 2012 14:09:01 UTC

Severity: wishlist

Found in version dpkg/1.16.7

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Dpkg Developers <>:
Bug#681477; Package dpkg-dev. (Fri, 13 Jul 2012 14:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <>. (Fri, 13 Jul 2012 14:09:10 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Raphael Hertzog <>
Subject: dpkg-vendor: implement --select-closest command versions
Date: Fri, 13 Jul 2012 16:07:32 +0200
Package: dpkg-dev
Version: 1.16.7
Severity: wishlist
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)

    # Mint specific options
else ifeq($(TARGET_VENDOR),ubuntu)
    # Ubuntu specific options
else ifeq($(TARGET_VENDOR),debian)
    # Debian specific options

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.

Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:

Changed Bug title to 'dpkg-vendor: implement --select-closest command' from 'dpkg-vendor: implement --select-closest command versions' Request was from Raphaël Hertzog <> to (Fri, 13 Jul 2012 14:30:04 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Thu Apr 24 07:31:48 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.