From 4454fd246b3b7f605dcd272b2107313ba53688c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 17 Jan 2025 00:01:13 +0000 Subject: Write Pre-Depends with a dash again in EDSP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason ~ that I don't know and can't come up with on the spot ~ we output the Pre-Depends field as PreDepends in the translated user-visible output and I accidentally copied that over to the untranslated variant that replaced the embedded copy (with a dash) in the EDSP generator. Code-copies and implementation details littered all over the place are apparently sometimes a good bug-free thing, too… Regression-of: 6828ae2c2f9268c8187f0fa91b3c464ed84a8476 Closes: #1093254 --- apt-pkg/pkgcache.cc | 2 +- .../test-external-dependency-solver-protocol | 29 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 1f5f12885..16df1704e 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -350,7 +350,7 @@ const char *pkgCache::DepType(unsigned char Type) } std::string_view pkgCache::DepType_NoL10n(unsigned char Type) { - std::array Types{"", "Depends", "PreDepends", "Suggests", + std::array Types{"", "Depends", "Pre-Depends", "Suggests", "Recommends", "Conflicts", "Replaces", "Obsoletes", "Breaks", "Enhances"}; if (Type < Types.size()) diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index ca6a5ae8b..75fc75b92 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -289,18 +289,32 @@ Message: This solver exits instantly' exit 1" 'E: External solver failed with: This solver exits instantly E: Sub-process exit1withmsg returned an error code (1)' +cat > Packages <= 2), ccc +Depends: ddd, eee (>= 42), fff +Recommends: ggg, hhh (>> 42), iii +Suggests: jjj, kkk (= 42), lll +Enhances: mmm, nnn (>> 42), ooo +Replaces: ppp, qqq (<< 42), rrr +Conflicts: sss, ttt (= 42), uuu +Breaks: vvv, www (<= 42), xxx +EOF + configarchitecture 'amd64' 'i386' for arch in 'amd64' 'i386' 'armel' 'armhf'; do insertinstalledpackage "dummy-httpd-$arch" "$arch" '1' 'Provides: httpd' done buildsimplenativepackage 'dummy-webserver' 'all' '1' 'unstable' 'Provides: httpd Multi-Arch: foreign' -testfailure apt install -s dummy-webserver -testsuccess apt install -s ./incoming/dummy-webserver_1_all.deb -testsuccess apt install -s ./incoming/dummy-webserver_1_all.deb --solver apt -testfailure apt install -s ./incoming/dummy-webserver_1_all.deb --solver dump +testfailure apt install -s dummy-webserver --with-source Packages +testsuccess apt install -s ./incoming/dummy-webserver_1_all.deb --with-source Packages +testsuccess apt install -s ./incoming/dummy-webserver_1_all.deb --solver apt --with-source Packages +testfailure apt install -s ./incoming/dummy-webserver_1_all.deb --solver dump --with-source Packages -testsuccess aptcache showpkg dummy-webserver --with-source ./incoming/dummy-webserver_1_all.deb +testsuccess aptcache showpkg dummy-webserver --with-source ./incoming/dummy-webserver_1_all.deb --with-source Packages cp -a rootdir/tmp/testsuccess.output showpkg.output testequal 'Reverse Depends: Dependencies: @@ -313,3 +327,8 @@ Provides: httpd Provides: httpd Provides: httpd Provides: httpd' grep 'Provides:' "$APT_EDSP_DUMP_FILENAME" + +if dpkg-checkbuilddeps -d 'dctrl-tools' /dev/null >/dev/null 2>&1; then + testsuccessequal "$(cat Packages) +" grep-dctrl -P depparse -s 'Package,Version,Architecture,Pre-Depends,Depends,Recommends,Suggests,Enhances,Replaces,Conflicts,Breaks' "$APT_EDSP_DUMP_FILENAME" +fi -- cgit v1.2.3-70-g09d2