Bug#1131329: Fix

Xavier <[email protected]> Fri, 20 Mar 2026 11:05:57 +0100
Newsgroups gmane.linux.debian.apt.devel
Message-ID <dfc3cf96-8559-4089-b9bb-9a4dfbfa73a7__38590.5807766662$1774001256$gmane$org@debian.org>
Control: tags -1 + patch

Hi,

here is a little patch that may fix the issue. Bug was discovered in 
#1131311:
- dh-sequence-nodejs automatically added "Provides: 
node-rollup-plugin-terser (= 1.0.0)" into node-rollup-plugin-terser 
7.0.2+~cs8.6.4-1.
- This is fixed in pkg-js-tools 0.17.3, and a workaround is set in 
version 7.0.2+~cs8.6.4-2

However, the message given by apt in its log was totally wrong (se bellow).

This little patch avoid checking the bad version.



----
Example of bad logs:

   The following packages have unmet dependencies:
    node-rollup-plugin-terser : Depends: node-babel-code-frame (>= 7)
                                Depends: node-babel-parser (>= 7)
                                Depends: node-jest-worker (>= 27~) but 
it is not going to be installed
                                Depends: node-serialize-javascript but 
it is not going to be installed
                                Depends: node-terser (>= 5) but it is 
not going to be installed
                                Depends: nodejs:any
   E: Unable to satisfy dependencies. Reached two conflicting assignments:
      1. node-rollup-plugin-terser:amd64=7.0.2+~cs8.6.4-1 is selected 
for install
      2. node-rollup-plugin-terser:amd64 Depends node-jest-worker (>= 27~)
         but none of the choices are installable:
         - node-jest-worker:amd64 is not selected for install because:
           1. node-rollup-plugin-terser:amd64=7.0.2+~cs8.6.4-1 is 
selected for install
           2. node-jest-worker:amd64 Breaks node-rollup-plugin-terser (< 
7.0.2-6~)
patch (text/plain, 786 B)
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 3377facac..c9204af0f 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -786,6 +786,12 @@ bool pkgCache::DepIterator::IsIgnorable(PrvIterator const &Prv) const
    // Implicit group-conflicts should not be applied on providers of other groups
    if (IsMultiArchImplicit() && Prv.OwnerPkg()->Group != Pkg->Group)
       return true;
+   // Self-provides (where the provider is the target package) should be
+   // ignored: the real version is already checked directly in AllTargets(),
+   // and the provide version may differ from the package version (e.g.
+   // embedded component versions via ${nodejs:Provides}).
+   if (Prv.OwnerPkg()->Group == TargetPkg()->Group)
+      return true;
 
    return false;
 }