From a6ea97b9844c9b78c7e9b24c241fc16be22e4176 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 13 Jun 2021 00:05:20 +0300 Subject: Skip/remove dangling implicit associations --- tests/pkg-drop.testscript | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'tests/pkg-drop.testscript') diff --git a/tests/pkg-drop.testscript b/tests/pkg-drop.testscript index ff42e58..a9e8f4f 100644 --- a/tests/pkg-drop.testscript +++ b/tests/pkg-drop.testscript @@ -693,4 +693,40 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 $pkg_status -r libbar >'libbar available 1.0.0' } + + : skip-deleted-dependency + : + { + $clone_cfg; + cp -pr ../cfg2 ./; + + $pkg_build libbar --yes >! &cfg/lib*/*** &cfg/lib*; + + mv cfg cfg.tmp; + + $* -d cfg2 libbaz <>/~%EOE%; + y + y + EOI + following dependent packages will have to be dropped as well: + foo (requires libbaz) + %drop dependent packages\? \[y.N\] drop foo% + drop libbaz + %continue\? \[Y.n\] disfigured foo% + disfigured libbaz + purged foo + purged libbaz + EOE + + # While at it, test that we properly handle the missing prerequisite + # situation. + # + mv cfg.tmp cfg; + + $* libbar 2>>/EOE != 0; + error: unable to find prerequisite package foo in associated configuration cfg2/ + EOE + + $pkg_status -d cfg2 -r 2>'info: no held packages in the configuration' + } } -- cgit v1.1