在 2024-07-22星期一的 06:18 +0000,Gábor Németh写道:
> Hi,
> 
> On 2024-07-22 03:05, Boyuan Yang wrote:
> > > https://mentors.debian.net/debian/pool/main/m/msc-generator/msc-generator_8.6.2-1.dsc
> > 
> > I think all changes look okay except for adding the usage of dpkg-vendor and
> > exporting a specific environment variable only on Debian in debian/rules.
> 
> I'll try to explain. This env var:
> 
> +VENDOR ?= $(shell dpkg-vendor --query vendor)
> ...
> +ifneq ($(VENDOR),Debian)
> +export PNGDIFF_LUMA_DIFF = 10
> +endif
> 
> only affects *tests*: the program `msc-gen` generates pixmaps and during
> tests we verify if some known input is rendered to the same PNG as some
> known canonical one. It becomes tricky exactly with downstream if a
> library like libcairo/libpango has a somewhat different version not
> otherwise affecting actual usability of the tool but causing one-two
> pixel differences when generating the test PNGs, failing package
> building and thus finally blocking a new package version to be accepted
> [1]. The upstream CI works on Debian and we fully can control what is
> expected on Debian, so in this sense the env var setting only makes
> Debian testing more strictly adhering to upstream.
> 
> In short, `dpkg-vendor` here only controls precision of PNG-generating
> tests and has no effect on the binary tool itself whatsoever. I can
> remove the distinction wrt. other ditros but would prefer to keep it to
> be in sync with upstream build results.
> 
> [1] https://bugs.launchpad.net/ubuntu/+source/msc-generator/+bug/2061755

If you are tackling [1], I have to remind you that your dpkg-vendor comparison
only applies to Debian and won't go into effect on Ubuntu. In other words,
it is useless in handling [1]. Besides Debian and Ubuntu, there are also
countless derivatives (LinuxMint, PopOS, ...); you won't be able to handle them
one by one.

My current understanding is that this environment variable loosens the
comparison threshold in tests. In that case, why not set this variable
unconditionally so that it covers both Debian and Ubuntu?

My preference is that we either set the variable unconditionally, or do
not set it at all. Unless you could convince me that it is necessary
to make the variable specific to only Debian and not applicable on
Ubuntu/LinuxMint/... , please tweak your source code and prepare another
version that does not utilize dpkg-vendor.

Thanks,
Boyuan Yang

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to