Package: dpkg-dev Version: 1.21.15 Severity: normal dpkg-gencontrol should also simplify OR(|)-ed lists of alternative Depends (and friends) by eliminating duplicates.
E.g. after applying ${substvars} and [arch1 arch2] limitations currently a result could be Depends: foo | bar | foo | baz which should be simplified by eliminating the second 'foo'. If 'foo' contains version constraints, only entries with identical version constraints should be considered for elimination. Defining superseding rules for differing versioned constraints might not be trivial ... foo (>> 2) | foo (>> 1) supersedes foo (>> 1) | foo (>> 2) does not supersede Practical examples: 1) nvidia-cuda-toolkit has Depends: gcc-${cuda-default-gcc-version} | gcc-11 | gcc-10 | ... where cuda-default-gcc-version is currently one of {10, 11} and set once in d/rules.defs (and used in several places) 2) libcuda1/libnvidia-tesla-cuda1 in experimental will soon have Recommends: ${nvidia}-kernel-dkms (= ${binary:Version}) | ${nvidia}-kernel-${version} | ${nvidia}-open-kernel-${version} | nvidia-open-kernel-${version} where ${nvidia} either substitutes 'nvidia' or 'nvidia-tesla' resulting in a duplicate nvidia-open-kernel-${version} for libcuda1. Andreas