diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2025-01-17 00:01:13 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2025-01-17 00:27:48 +0000 |
| commit | 4454fd246b3b7f605dcd272b2107313ba53688c5 (patch) | |
| tree | 9b4bb45421ecc9999089f99a6d67b8a3f9288148 | |
| parent | 5429e2324f24a08b8460496e3fe2247545ed45be (diff) | |
Write Pre-Depends with a dash again in EDSP
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
| -rw-r--r-- | apt-pkg/pkgcache.cc | 2 | ||||
| -rwxr-xr-x | test/integration/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<std::string_view, 12> Types{"", "Depends", "PreDepends", "Suggests", + std::array<std::string_view, 12> 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 <<EOF +Package: depparse +Version: 42-1 +Architecture: all +Pre-Depends: aaa, bbb (>= 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 |
