Hi!

On Thu, 2018-11-15 at 15:49:08 +0000, Colin Watson wrote:
> 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)

Right, thanks fixed this locally.

> 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.

Yeah, I'd probably have done the $(shell) call from within the macro
too, but I don't think this can be changed now, there's at least one
user in Debian, so there might be others in the wild. It could be
changed with a revised (and versioned) iteration of the file.

Thanks,
Guillem

Reply via email to