Package: dpkg-dev
Version: 1.19.2
Severity: normal

The header comment in vendor.mk says:

  # The snippet also defines a macro "dpkg_vendor_derives_from" that you can
  # use to verify if the current vendor derives from another vendor with a
  # simple test like this one:
  # ifeq ($(call dpkg_vendor_derives_from ubuntu),yes)
  #   ...
  # endif

But dpkg_vendor_derives_from is defined like this:

  dpkg_vendor_derives_from = dpkg-vendor --derives-from $(1) && echo yes || 
echo no

So the documentation is wrong in two ways:

 * that's not how passing arguments to $(call) works
 * the result of the macro needs to be passed to $(shell)

A working version of the test in the header comment would be:

  # ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes)

This seems a bit cumbersome and I don't know whether it's actually the
interface you intended, although presumably there would be compatibility
concerns with changing it.

(I noticed this because I tried to use dpkg_vendor_derives_from in
openssh, and then Jeremy Bicha pointed out to me that it broke:
https://salsa.debian.org/ssh-team/openssh/commit/2df9bff12640a33749f0f20ae806b6efac327116#note_52100)

Thanks,

-- 
Colin Watson                                       [cjwat...@debian.org]

Reply via email to