Package: libopencv-core406 Version: 4.6.0+dfsg-11 Severity: serious Tags: patch User: debian...@lists.debian.org Usertags: piuparts
Hi, while analyzing piuparts bullseye -> bookworm upgrade logs I found several cases where apt chose a suboptimal solution that involved keeping some upgradable package at the bullseye version in order to keep some obsolete library from bullseye installed. Many of these problematic upgrade paths involve packages from src:opencv and src:onetbb where the library stacks from bullseye and bookworm are not co-installable due to long transitive dependency chains. We can easily hint apt into doing the right thing by adding Breaks against the highest scoring package from the old library stack to the highest scoring library from the new library stack, in this case these are libopencv-core406 in bookworm and libopencv-core4.5 in bullseye. Please consider applying the attached patch. Andreas PS: a similar change is needed for src:onetbb PPS: for the curious: apt problemresolver debug output from a randomly selected opencv binary package (may not be the best example) ... Starting 2 pkgProblemResolver with broken count: 2 Investigating (0) libtbbmalloc2:amd64 < none -> 2021.8.0-1 @un uN Ib > Broken libtbbmalloc2:amd64 Breaks on libtbb2:amd64 < 2020.3-1 @ii mK > (< 2020.3-1ubuntu2) Considering libtbb2:amd64 2 as a solution to libtbbmalloc2:amd64 1 Holding Back libtbbmalloc2:amd64 rather than change libtbb2:amd64 Investigating (0) libsemanage1:amd64 < 3.1-1+b2 @ii mK Ib > Broken libsemanage1:amd64 Depends on libsemanage-common:amd64 < 3.1-1 -> 3.4-1 @ii umU > (= 3.1-1) Considering libsemanage-common:amd64 1 as a solution to libsemanage1:amd64 -2 Removing libsemanage1:amd64 rather than change libsemanage-common:amd64 Investigating (1) libtbb12:amd64 < none -> 2021.8.0-1 @un uN Ib > Broken libtbb12:amd64 Depends on libtbbmalloc2:amd64 < none | 2021.8.0-1 @un uH > (= 2021.8.0-1) Considering libtbbmalloc2:amd64 1 as a solution to libtbb12:amd64 8 Holding Back libtbb12:amd64 rather than change libtbbmalloc2:amd64 Investigating (1) libtbb-dev:amd64 < 2020.3-1 -> 2021.8.0-1 @ii umU Ib > Broken libtbb-dev:amd64 Depends on libtbb12:amd64 < none | 2021.8.0-1 @un uH > (= 2021.8.0-1) Considering libtbb12:amd64 8 as a solution to libtbb-dev:amd64 2 Holding Back libtbb-dev:amd64 rather than change libtbb12:amd64 Investigating (2) libopencv-core406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-core406:amd64 Depends on libtbb12:amd64 < none | 2021.8.0-1 @un uH > (>= 2021.4.0) Considering libtbb12:amd64 8 as a solution to libopencv-core406:amd64 12 Holding Back libopencv-core406:amd64 rather than change libtbb12:amd64 Investigating (2) libopencv-imgproc406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-imgproc406:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (>= 4.6.0+dfsg) Considering libopencv-core406:amd64 12 as a solution to libopencv-imgproc406:amd64 5 Holding Back libopencv-imgproc406:amd64 rather than change libopencv-core406:amd64 Investigating (2) libopencv-core-dev:amd64 < 4.5.1+dfsg-5 -> 4.6.0+dfsg-11 @ii umU Ib > Broken libopencv-core-dev:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (= 4.6.0+dfsg-11) Considering libopencv-core406:amd64 12 as a solution to libopencv-core-dev:amd64 2 Holding Back libopencv-core-dev:amd64 rather than change libopencv-core406:amd64 Try to Re-Instate (2) libtbb-dev:amd64 Investigating (2) libopencv-imgproc-dev:amd64 < 4.5.1+dfsg-5 -> 4.6.0+dfsg-11 @ii umU Ib > Broken libopencv-imgproc-dev:amd64 Depends on libopencv-core-dev:amd64 < 4.5.1+dfsg-5 | 4.6.0+dfsg-11 @ii umH > (= 4.6.0+dfsg-11) Considering libopencv-core-dev:amd64 2 as a solution to libopencv-imgproc-dev:amd64 1 Holding Back libopencv-imgproc-dev:amd64 rather than change libopencv-core-dev:amd64 Investigating (2) libopencv-flann406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-flann406:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (>= 4.6.0+dfsg) Considering libopencv-core406:amd64 12 as a solution to libopencv-flann406:amd64 1 Holding Back libopencv-flann406:amd64 rather than change libopencv-core406:amd64 Investigating (2) libopencv-video406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-video406:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (>= 4.6.0+dfsg) Considering libopencv-core406:amd64 12 as a solution to libopencv-video406:amd64 0 Holding Back libopencv-video406:amd64 rather than change libopencv-core406:amd64 Investigating (2) libopencv-calib3d406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-calib3d406:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (>= 4.6.0+dfsg) Considering libopencv-core406:amd64 12 as a solution to libopencv-calib3d406:amd64 0 Holding Back libopencv-calib3d406:amd64 rather than change libopencv-core406:amd64 Investigating (2) libopencv-features2d406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-features2d406:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (>= 4.6.0+dfsg) Considering libopencv-core406:amd64 12 as a solution to libopencv-features2d406:amd64 0 Holding Back libopencv-features2d406:amd64 rather than change libopencv-core406:amd64 Investigating (2) libopencv-dnn406:amd64 < none -> 4.6.0+dfsg-11 @un uN Ib > Broken libopencv-dnn406:amd64 Depends on libopencv-core406:amd64 < none | 4.6.0+dfsg-11 @un uH > (>= 4.6.0+dfsg) Considering libopencv-core406:amd64 12 as a solution to libopencv-dnn406:amd64 0 Holding Back libopencv-dnn406:amd64 rather than change libopencv-core406:amd64 Investigating (2) libopencv-video-dev:amd64 < 4.5.1+dfsg-5 -> 4.6.0+dfsg-11 @ii umU Ib > Broken libopencv-video-dev:amd64 Depends on libopencv-imgproc-dev:amd64 < 4.5.1+dfsg-5 | 4.6.0+dfsg-11 @ii umH > (= 4.6.0+dfsg-11) Considering libopencv-imgproc-dev:amd64 1 as a solution to libopencv-video-dev:amd64 0 Holding Back libopencv-video-dev:amd64 rather than change libopencv-imgproc-dev:amd64 Try to Re-Instate (3) libopencv-core-dev:amd64 Try to Re-Instate (3) libopencv-imgproc-dev:amd64 Try to Re-Instate (3) libopencv-video-dev:amd64 Done The following packages will be REMOVED: libsemanage1 The following NEW packages will be installed: gcc-12-base libcap2 libffi8 libfile-find-rule-perl libgdbm-compat4 libgdbm6 libmd0 libnumber-compare-perl libperl5.36 libsemanage2 libsepol2 libssl3 libtext-glob-perl perl perl-modules-5.36 rpcsvc-proto usrmerge util-linux-extra The following packages have been kept back: libopencv-core-dev libopencv-imgproc-dev libopencv-video-dev libtbb-dev The following packages will be upgraded: ... and now with packages that have the Breaks added: ... Starting 2 pkgProblemResolver with broken count: 4 Investigating (0) libopencv-core406:amd64 < none -> 4.6.0+dfsg-11.1~deb12anbe1 @un uN Ib > Broken libopencv-core406:amd64 Breaks on libopencv-core4.5:amd64 < 4.5.1+dfsg-5 @ii mK > (< 4.6) Considering libopencv-core4.5:amd64 5 as a solution to libopencv-core406:amd64 12 Added libopencv-core4.5:amd64 to the remove list Fixing libopencv-core406:amd64 via remove of libopencv-core4.5:amd64 Investigating (0) libtbb12:amd64 < none -> 2021.8.0-1.1~deb12anbe1 @un uN Ib > Broken libtbb12:amd64 Breaks on libtbb2:amd64 < 2020.3-1 @ii mK > (< 2021) Considering libtbb2:amd64 0 as a solution to libtbb12:amd64 8 Added libtbb2:amd64 to the remove list Fixing libtbb12:amd64 via remove of libtbb2:amd64 Investigating (0) libopencv-imgproc4.5:amd64 < 4.5.1+dfsg-5 @ii mK Ib > Broken libopencv-imgproc4.5:amd64 Depends on libopencv-core4.5:amd64 < 4.5.1+dfsg-5 @ii mR > (>= 4.5.1+dfsg) Considering libopencv-core4.5:amd64 5 as a solution to libopencv-imgproc4.5:amd64 2 Removing libopencv-imgproc4.5:amd64 rather than change libopencv-core4.5:amd64 Investigating (0) libopencv-flann4.5:amd64 < 4.5.1+dfsg-5 @ii mK Ib > Broken libopencv-flann4.5:amd64 Depends on libopencv-core4.5:amd64 < 4.5.1+dfsg-5 @ii mR > (>= 4.5.1+dfsg) Considering libopencv-core4.5:amd64 5 as a solution to libopencv-flann4.5:amd64 0 Removing libopencv-flann4.5:amd64 rather than change libopencv-core4.5:amd64 Investigating (0) libopencv-dnn4.5:amd64 < 4.5.1+dfsg-5 @ii mK Ib > Broken libopencv-dnn4.5:amd64 Depends on libopencv-core4.5:amd64 < 4.5.1+dfsg-5 @ii mR > (>= 4.5.1+dfsg) Considering libopencv-core4.5:amd64 5 as a solution to libopencv-dnn4.5:amd64 -1 Removing libopencv-dnn4.5:amd64 rather than change libopencv-core4.5:amd64 Investigating (0) libopencv-features2d4.5:amd64 < 4.5.1+dfsg-5 @ii mK Ib > Broken libopencv-features2d4.5:amd64 Depends on libopencv-core4.5:amd64 < 4.5.1+dfsg-5 @ii mR > (>= 4.5.1+dfsg) Considering libopencv-core4.5:amd64 5 as a solution to libopencv-features2d4.5:amd64 -1 Removing libopencv-features2d4.5:amd64 rather than change libopencv-core4.5:amd64 Investigating (0) libopencv-calib3d4.5:amd64 < 4.5.1+dfsg-5 @ii mK Ib > Broken libopencv-calib3d4.5:amd64 Depends on libopencv-core4.5:amd64 < 4.5.1+dfsg-5 @ii mR > (>= 4.5.1+dfsg) Considering libopencv-core4.5:amd64 5 as a solution to libopencv-calib3d4.5:amd64 -1 Removing libopencv-calib3d4.5:amd64 rather than change libopencv-core4.5:amd64 Investigating (0) libopencv-video4.5:amd64 < 4.5.1+dfsg-5 @ii mK Ib > Broken libopencv-video4.5:amd64 Depends on libopencv-calib3d4.5:amd64 < 4.5.1+dfsg-5 @ii mR > (>= 4.5.1+dfsg) Considering libopencv-calib3d4.5:amd64 -1 as a solution to libopencv-video4.5:amd64 -2 Removing libopencv-video4.5:amd64 rather than change libopencv-calib3d4.5:amd64 Investigating (0) libsemanage1:amd64 < 3.1-1+b2 @ii mK Ib > Broken libsemanage1:amd64 Depends on libsemanage-common:amd64 < 3.1-1 -> 3.4-1 @ii umU > (= 3.1-1) Considering libsemanage-common:amd64 1 as a solution to libsemanage1:amd64 -2 Removing libsemanage1:amd64 rather than change libsemanage-common:amd64 Done The following package was automatically installed and is no longer required: libprotobuf23 Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: libopencv-calib3d4.5 libopencv-core4.5 libopencv-dnn4.5 libopencv-features2d4.5 libopencv-flann4.5 libopencv-imgproc4.5 libopencv-video4.5 libsemanage1 libtbb2 The following NEW packages will be installed: gcc-12-base libblas3 libbsd0 libcap2 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libexpat1 libffi8 libfile-find-rule-perl libgdbm-compat4 libgdbm6 libgfortran5 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libhwloc15 libicu72 liblapack3 libllvm15 libmd0 libnumber-compare-perl libopencv-calib3d406 libopencv-core406 libopencv-dnn406 libopencv-features2d406 libopencv-flann406 libopencv-imgproc406 libopencv-video406 libpciaccess0 libperl5.36 libprotobuf32 libquadmath0 libsemanage2 libsensors-config libsensors5 libsepol2 libssl3 libtbb12 libtbbbind-2-5 libtbbmalloc2 libtext-glob-perl libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxcb1 libxdmcp6 libxext6 libxfixes3 libxml2 libxshmfence1 libxxf86vm1 libz3-4 perl perl-modules-5.36 rpcsvc-proto usrmerge util-linux-extra The following packages will be upgraded: ...
>From d8438234aa51cb0ab79e073793cd4c01e5115ec4 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann <a...@debian.org> Date: Tue, 9 May 2023 23:26:58 +0200 Subject: [PATCH 1/2] libopencv-core406: Add Breaks: libopencv-core4.5 for smoother upgrades from bullseye The two opencv versions are not co-installable due to some not co-installable dependencies (at least libtbb2/libtbb12, maybe more). Adding Breaks against the highest scoring obsolete package should hint apt to favor removing the whole obsolete stack instead of trying to keep (some of) the obsolete packages installed by not upgrading some other packages to the new version. Closes: # --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 4b6a4c095..421f0eb14 100644 --- a/debian/control +++ b/debian/control @@ -168,6 +168,7 @@ Section: libs Depends: ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} +Breaks: libopencv-core4.5 (<< 4.6), Description: computer vision core library This package contains the OpenCV (Open Computer Vision) core runtime libraries. . -- 2.20.1
>From af66a19f73c3d2b0eefd1a51604c405dd0bc64db Mon Sep 17 00:00:00 2001 From: Andreas Beckmann <a...@debian.org> Date: Tue, 9 May 2023 23:39:59 +0200 Subject: [PATCH 2/2] gbp.conf: move the component setting to the DEFAULT section Gbp-Dch: ignore --- debian/gbp.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/gbp.conf b/debian/gbp.conf index b5d1dad92..f2905a065 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -1,3 +1,5 @@ +[DEFAULT] +component = contrib + [import-orig] pristine-tar = True -component = contrib -- 2.20.1