Package: dose-distcheck
Version: 7.0.0-8
Severity: normal
Tags: upstream

Hello,

dose-distcheck drops the version constraint of arch-qualified :any
relations. A versioned Conflicts: b:any (<< X) fires against every version
of b. A versioned Depends: b:any (>= X) is satisfied by any version of
b. dpkg disagrees in both cases.

Seen with 7.0.0-8+b2 (sid). 7.0.0-1+b2 (bookworm) gives the same output.

Reproducer 1: versioned :any Conflicts (false "broken")
---------------------------------------------------------

any_versioned_conflict.Packages:

Package: a
Version: 1.0
Architecture: all
Depends: b
Conflicts: b:any (<< 1:13)

Package: b
Version: 1:29
Architecture: amd64
Multi-Arch: allowed

$ dose-distcheck --deb-native-arch=amd64 --deb-ignore-essential -f -e -s 
deb:///r/any_versioned_conflict.Packages

Expected: a is installable, because 1:29 is not << 1:13.
Actual (output trimmed to the report for a; exit status 1):

package: a
version: 1.0
architecture: all
status: broken
reasons:
-
conflict:
pkg1:
package: a
version: 1.0
architecture: all
unsat-conflict: b (< 1:13)
pkg2:
package: b
version: 1:29
architecture: amd64
...
total-packages: 2
broken-packages: 1

Reproducer 2: versioned :any Depends (false "installable")
------------------------------------------------------------

any_versioned_depends.Packages:

Package: a
Version: 1.0
Architecture: all
Depends: b:any (>= 1:40)

Package: b
Version: 1:29
Architecture: amd64
Multi-Arch: allowed

$ dose-distcheck --deb-native-arch=amd64 --deb-ignore-essential -f -e -s 
deb:///r/any_versioned_depends.Packages

Expected: a is broken, because no b (>= 1:40) exists.
Actual (exit status 0):

package: a
version: 1.0
architecture: all
status: ok
installationset:
-
package: b
version: 1:29
architecture: amd64
-
package: a
version: 1.0
architecture: all
...
total-packages: 2
broken-packages: 0

Confirmation with dpkg
----------------------

I built the same control files with dpkg-deb -b (plus Maintainer and
Description) and installed them with dpkg -i b.deb a.deb:

- Reproducer 1: both packages install and are ii (a 1.0, b 1:29).
- Reproducer 2: dpkg refuses to configure a, which is left iU:

dpkg: dependency problems prevent configuration of a:
a depends on b:any (>= 1:40); however:

Real-world impact
-----------------

In Debian forky and sid (and Kali rolling), erlang-doc 1:29.1.3+dfsg-1 has
Conflicts: erlang-base:any (<< 1:13.b.4). dose-distcheck reports it as
broken because of unsat-conflict: erlang-base (< 1:13.b.4) against
erlang-base 1:29.1.3+dfsg-1, which is Multi-Arch: allowed. dose also
accepts any erlang-base version for constraints such as
erlang-examples: Depends: erlang-base:any (>= 1:29.1.3+dfsg-1).

Possible cause (hypothesis, not verified)
-----------------------------------------

In src/deb/debcudf.ml (upstream 7.0.0, which the Debian patches don't
touch), add_arch_info (l. 113) maps (n, Some "any") to the plain name
n, and keeps the version constraint. Every package provides that plain name
without a version (l. 468, archlessprovide), and M-A:allowed packages also
provide n:any without a version (l. 491). In CUDF an unversioned provide
matches any version constraint, so the constraint is lost.

#930625 reports the Depends side of this for dose-deb-coinstall (5.0.1-12).
This report adds the Conflicts side, which causes false "broken" results in
dose-distcheck.

Thanks,
José A. Galindo

Reply via email to