diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-06-13 00:05:20 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-07-01 11:19:12 +0300 |
commit | a6ea97b9844c9b78c7e9b24c241fc16be22e4176 (patch) | |
tree | 752be3b34a99e82f85ddb9c3b9ec4a02346f3edc /tests | |
parent | d77ca8720df495017139a24a59c502f53c07df9f (diff) |
Skip/remove dangling implicit associations
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pkg-drop.testscript | 36 |
1 files changed, 36 insertions, 0 deletions
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 <<EOI 2>>/~%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' + } } |