diff options
Diffstat (limited to 'tests/pkg-drop.testscript')
-rw-r--r-- | tests/pkg-drop.testscript | 58 |
1 files changed, 47 insertions, 11 deletions
diff --git a/tests/pkg-drop.testscript b/tests/pkg-drop.testscript index 930c4f3..83fa13b 100644 --- a/tests/pkg-drop.testscript +++ b/tests/pkg-drop.testscript @@ -486,10 +486,10 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 cp -pr ../cfg-bar ./; cp -pr ../cfg-foo ./; - $pkg_build libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes 2>!; - $pkg_build libbaz 2>!; + $pkg_build libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes; + $pkg_build libbaz; - $pkg_build '?libbar' +{ --config-id 1 } 2>!; + $pkg_build '?libbar' +{ --config-id 1 }; $* libbaz <<EOI 2>>/~%EOE% y @@ -517,14 +517,14 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 cp -pr ../cfg-bar ./; cp -pr ../cfg-foo ./; - $pkg_build libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes 2>!; - $pkg_build libbaz 2>!; + $pkg_build libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes; + $pkg_build libbaz; # Make sure that dependents of a package being dropped can be found in # implicitly linked configurations recursively. Note that configuring # libbar as system, we make libbaz an only dependent of libfoo. # - $pkg_build '?sys:libbar' +{ --config-id 1 } 2>!; + $pkg_build '?sys:libbar' +{ --config-id 1 }; $pkg_status -r libbaz >>/EOO; !libbaz configured 1.1.0 @@ -575,8 +575,8 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 $cfg_link -d cfg-bar cfg; $cfg_link -d cfg-foo cfg-bar; - $pkg_build libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes 2>!; - $pkg_build libbaz 2>!; + $pkg_build libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes; + $pkg_build libbaz; $pkg_status -r libbaz >>/EOO; !libbaz configured 1.1.0 @@ -632,7 +632,7 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 $clone_cfg; cp -pr ../cfg2 ./; - $pkg_build libbar --yes &cfg2/.bpkg/build2/*** >!; + $pkg_build libbar --yes &cfg2/.bpkg/build2/***; $* libbar <<EOI 2>>/~%EOE%; y @@ -669,7 +669,7 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 $clone_cfg; cp -pr ../cfg2 ./; - $pkg_build libbar --yes &cfg2/.bpkg/build2/*** >!; + $pkg_build libbar --yes &cfg2/.bpkg/build2/***; $* -d cfg2 libbaz <<EOI 2>>/~%EOE%; y @@ -702,13 +702,49 @@ $* libfoo/1.0.0 2>>~%EOE% != 0 $pkg_status -r libbar >'libbar available 1.0.0' } + : drop-private-dependency + : + { + $clone_root_cfg && $rep_add $rep/t7a && $rep_fetch; + + $pkg_build libbar --yes &cfg/.bpkg/host/*** &cfg/.bpkg/build2/***; + + $* -d cfg/.bpkg/build2/ libbuild2-bar <<EOI 2>>/~%EOE% + y + y + y + EOI + following dependent packages will have to be dropped as well: + foo [cfg/.bpkg/host/] (requires libbuild2-bar) + libbar [cfg/] (requires foo [cfg/.bpkg/host/]) + %drop dependent packages\? \[y.N\] following dependencies were automatically built but will no longer be used:% + libbaz [cfg/.bpkg/host/] + libbaz [cfg/] + %drop unused packages\? \[Y.n\] drop libbar \[cfg/\]% + drop foo [cfg/.bpkg/host/] + drop libbuild2-bar + drop libbaz [cfg/.bpkg/host/] + drop libbaz [cfg/] + %continue\? \[Y.n\] disfigured libbar \[cfg/\]% + disfigured foo [cfg/.bpkg/host/] + disfigured libbuild2-bar + disfigured libbaz [cfg/.bpkg/host/] + disfigured libbaz [cfg/] + purged libbar [cfg/] + purged foo [cfg/.bpkg/host/] + purged libbuild2-bar + purged libbaz [cfg/.bpkg/host/] + purged libbaz [cfg/] + EOE + } + : skip-deleted-dependency : { $clone_cfg; cp -pr ../cfg2 ./; - $pkg_build libbar --yes >! &cfg/lib*/*** &cfg/lib* &cfg2/.bpkg/build2/***; + $pkg_build libbar --yes &cfg/lib*/*** &cfg/lib* &cfg2/.bpkg/build2/***; mv cfg cfg.tmp; |