From 5d513688ae07d96910dd1eef83bdad4e9d780373 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Apr 2021 21:57:13 +0300 Subject: Add support for linked configurations --- tests/pkg-build.testscript | 1903 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1898 insertions(+), 5 deletions(-) (limited to 'tests/pkg-build.testscript') diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 64e6af8..a632b67 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -113,6 +113,30 @@ # | | `-- root.build # | `-- * # | +# |-- t7a +# | |-- libbaz-1.0.0.tar.gz +# | |-- foo-1.0.0.tar.gz -> libbaz ^1.0.0 +# | |-- libbuild2-bar-1.0.0.tar.gz +# | |-- libbuild2-foo-1.0.0.tar.gz -> libbuild2-bar ^1.0.0, * foo ^1.0.0, +# | | libbaz ^1.0.0 +# | |-- libbiz-1.0.0.tar.gz -> * libbuild2-foo ^1.0.0, * foo ^1.0.0, +# | | libbaz ^1.0.0 +# | |-- libbuz-1.0.0.tar.gz -> * libbuild2-foo ^1.0.0, * foo ^1.0.0 +# | |-- libbix-1.0.0.tar.gz -> libbiz ^1.0.0, libbuz ^1.0.0 +# | |-- libbar-1.0.0.tar.gz -> * foo ^1.0.0, libbaz ^1.0.0 +# | |-- libbox-1.0.0.tar.gz -> * foo ^1.0.0, libbaz ^1.0.0 +# | |-- libfax-1.0.0.tar.gz +# | |-- libfix-1.0.0.tar.gz -> libbar ^1.0.0, libbox ^1.0.0, +# | | libfax ^1.0.0 +# | `-- repositories.manifest +# | +# |-- t7b -> t7a (complement repository) +# | |-- libbaz-1.1.0.tar.gz +# | |-- foo-1.1.0.tar.gz -> libbaz ^1.1.0 +# | |-- libbar-1.1.0.tar.gz -> * foo ^1.1.0, libbaz ^1.0.0 +# | |-- libbox-1.1.0.tar.gz -> * foo ^1.0.0 +# | `-- repositories.manifest +# | # `-- git # |-- libbar.git -> style-basic.git (prerequisite repository) # |-- libbaz.git @@ -139,6 +163,8 @@ posix = ($cxx.target.class != 'windows') cp -r $src/t4e $out/t4e && $rep_create $out/t4e &$out/t4e/packages.manifest cp -r $src/t5 $out/t5 && $rep_create $out/t5 &$out/t5/packages.manifest cp -r $src/t6 $out/t6 && $rep_create $out/t6 &$out/t6/packages.manifest + cp -r $src/t7a $out/t7a && $rep_create $out/t7a &$out/t7a/packages.manifest + cp -r $src/t7b $out/t7b && $rep_create $out/t7b &$out/t7b/packages.manifest # Create git repositories. # @@ -149,6 +175,8 @@ end config_cxx = config.cxx=$quote($recall($cxx.path) $cxx.config.mode, true) +cfg_create += 2>! +cfg_link += 2>! pkg_configure += -d cfg $config_cxx 2>! pkg_disfigure += -d cfg pkg_drop += -d cfg --yes 2>! @@ -408,6 +436,18 @@ test.options += --no-progress info: while satisfying libbar/1.0.0 EOE + : unknown-dependency-config + : + : As above but with a linked configuration. + : + $clone_root_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + $* $src/libbar-1.0.0.tar.gz +{ --config-id 1 } 2>>~%EOE% != 0 + %error: unknown dependency libfoo of package libbar \[cfg2.\]% + %info: while satisfying libbar/1.0.0 \[cfg2.\]% + EOE + : t2 : { @@ -513,6 +553,21 @@ test.options += --no-progress EOO } + : latest-config + : + : As above but with a linked configuration. + : + { + $clone_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $* libbar/1.1.0 +{ --config-id 1 } >>~%EOO% + %new libfoo/1.1.0\+1 \[cfg2.\] \(required by libbar \[cfg2.\]\)% + %new libbar/1.1.0 \[cfg2.\]% + EOO + } + : zero : { @@ -755,6 +810,24 @@ test.options += --no-progress info: while satisfying libbaz/1.1.0 EOE + : unable-satisfy-config + : + : As above but with a linked configuration. + : + $clone_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + $* libbaz ?libbar +{ --config-id 1 } libfoo/1.0.0 +{ --config-id 1 } 2>>~%EOE% != 0 + error: unable to satisfy constraints on package libfoo + info: command line depends on (libfoo == 1.0.0) + % info: libbar \[cfg2.\] depends on \(libfoo == 1.1.0\)% + info: available libfoo/1.0.0 + info: available libfoo/1.1.0 + info: explicitly specify libfoo version to manually satisfy both constraints + %info: while satisfying libbar/1.1.0 \[cfg2.\]% + info: while satisfying libbaz/1.1.0 + EOE + : not-available : $clone_cfg; @@ -832,6 +905,38 @@ test.options += --no-progress $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0'; $pkg_purge libfoo 2>'purged libfoo/1.1.0' } + + : unable-downgrade-config + : + : As above but with a linked configuration. + : + { + $clone_cfg; + $cfg_create -d cfg2 &cfg2/***; + $rep_add -d cfg2 $rep/t4c && $rep_fetch -d cfg2; + $cfg_link -d cfg2 cfg; + $pkg_fetch libfoo/1.1.0 && $pkg_unpack libfoo && $pkg_configure libfoo; + $pkg_fetch libbar/1.1.0 && $pkg_unpack libbar && $pkg_configure libbar; + + $* libfoo-1.2.0.tar.gz 2>>EOE != 0; + error: unknown package libfoo-1.2.0.tar.gz + EOE + + $* -d cfg2 libfoo/1.0.0 +{ --config-id 1 } 2>>~%EOE% != 0; + %error: unable to downgrade package libfoo/1.1.0 \[cfg.\] to 1.0.0% + % info: because package libbar \[cfg.\] depends on \(libfoo == 1.1.0\)% + info: explicitly request up/downgrade of package libbar + info: or explicitly specify package libfoo version to manually satisfy these constraints + EOE + + $* libfoo/1.1.0 --keep-unused >'update libfoo/1.1.0'; + + $pkg_disfigure libbar 2>'disfigured libbar/1.1.0'; + $pkg_purge libbar 2>'purged libbar/1.1.0'; + + $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0'; + $pkg_purge libfoo 2>'purged libfoo/1.1.0' + } } : dependent-reconfiguration @@ -1166,6 +1271,37 @@ test.options += --no-progress $pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0'; $pkg_purge libfoo 2>'purged libfoo/1.0.0' } + + : forcing-upgrade-held-config + : + : As above but with a linked configuration. + : + { + $clone_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $* libfoo/1.0.0 +{ --config-id 1 } 2>>~%EOE%; + %fetched libfoo/1.0.0 \[cfg2.\]% + %unpacked libfoo/1.0.0 \[cfg2.\]% + %configured libfoo/1.0.0 \[cfg2.\]% + %info: .+ is up to date% + %updated libfoo/1.0.0 \[cfg2.\]% + EOE + + $pkg_status -d cfg2 libfoo >'!libfoo configured !1.0.0'; + + $* libbaz ?libbar +{ --config-id 1 } 2>>~%EOE% != 0; + %error: package libbar \[cfg2.\] dependency on \(libfoo == 1.1.0\) is forcing upgrade of libfoo/1.0.0 \[cfg2.\] to 1.1.0% + % info: package version libfoo/1.0.0 \[cfg2.\] is held% + info: explicitly request version upgrade to continue + %info: while satisfying libbar/1.1.0 \[cfg2.\]% + info: while satisfying libbaz/1.1.0 + EOE + + $pkg_disfigure -d cfg2 libfoo 2>'disfigured libfoo/1.0.0'; + $pkg_purge -d cfg2 libfoo 2>'purged libfoo/1.0.0' + } } : drop-dependencies @@ -2326,6 +2462,32 @@ test.options += --no-progress $pkg_drop libbar } + + : unsatisfied-config + : + : As above but with a linked configuration. + : + { + $clone_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $* libbar/0.0.1 2>!; + + $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3'; + + $* ?libbaz/0.0.3 +{ --config-id 1 } 2>>EOE != 0; + error: unable to satisfy constraints on package libbaz + info: libbar depends on (libbaz == 0.0.1) + info: command line depends on (libbaz == 0.0.3) + info: specify libbaz version to satisfy libbar constraint + info: while satisfying libbar/0.0.1 + EOE + + $pkg_status libbaz >'libbaz configured 0.0.1 available 0.1.0 0.0.4 0.0.3'; + + $pkg_drop libbar + } } : scratch @@ -2480,7 +2642,7 @@ test.options += --no-progress : as a dependency, so it is built incrementally. : { - $cfg_create cxx $config_cxx -d cfg 2>- &cfg/***; + $cfg_create cxx $config_cxx -d cfg &cfg/***; # Add libhello as the dir repository. # @@ -2899,7 +3061,7 @@ test.options += --no-progress { test.arguments += --yes - +$cfg_create cxx $config_cxx -d cfg 2>- &cfg/*** + +$cfg_create cxx $config_cxx -d cfg &cfg/*** : direct : @@ -2918,6 +3080,27 @@ test.options += --no-progress EOE } + : direct-config + : + : As above but with a linked configuration. + : + { + $clone_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + cp -r $src/libfoo-1.1.0/ libfoo; + echo "depends: libfoo" >+ libfoo/manifest; + $rep_add libfoo --type dir; + + $rep_fetch; + + $* libfoo +{ --config-id 1 } 2>>~%EOE% != 0 + %error: dependency cycle detected involving package libfoo \[cfg2.\]% + % info: libfoo/1.1.0 \[cfg2.\] depends on libfoo/1.1.0 \[cfg2.\]% + EOE + } + : indirect : { @@ -2996,7 +3179,7 @@ test.options += --no-progress { test.arguments += --yes - +$cfg_create cxx $config_cxx -d cfg 2>- &cfg/*** + +$cfg_create cxx $config_cxx -d cfg &cfg/*** +cp -r $src/libhello-1.0.0 ./libhello +$rep_add libhello --type dir +$rep_fetch @@ -3472,6 +3655,30 @@ test.options += --no-progress $pkg_drop libfoo } + : no-patch-config + : + : As above but with a linked configuration. + : + { + $clone_root_cfg; + $cfg_create -d cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $* "libfoo@$rep/t1" +{ --config-id 1 } --patch 2>>~%EOE%; + %.+ + %configured libfoo/1.0.0 \[cfg2.\]% + %info: .+ is up to date% + %updated libfoo/1.0.0 \[cfg2.\]% + EOE + + $* "libfoo@$rep/t3" +{ --config-id 1 } --patch 2>>~%EOE% != 0; + %.+ + %error: patch version for libfoo/1.0.0 \[cfg2.\] is not found in pkg:build2.org/pkg-build/t3% + EOE + + $pkg_drop -d cfg2 libfoo + } + : package-in-complement : { @@ -3574,7 +3781,7 @@ test.options += --no-progress : keep-out : { - +$cfg_create cxx $config_cxx -d cfg 2>- &cfg/*** + +$cfg_create cxx $config_cxx -d cfg &cfg/*** # Build libhello as an external package. # @@ -3692,7 +3899,7 @@ test.options += --no-progress # Distribute using the dedicated configuration to avoid the 'c and cxx # module toolchain pattern mismatch' warning. # - +$cfg_create cxx $config_cxx -d cfg 2>- &cfg/*** + +$cfg_create cxx $config_cxx -d cfg &cfg/*** +$build 'dist(../../libhello/@./cfg/libhello/)' \ config.dist.root=./ \ @@ -3991,3 +4198,1689 @@ else $pkg_purge style-basic } } + +: linked-configs +: +{ + : 2-configs + : + { + +$clone_root_cfg && $rep_add $rep/t4c && $rep_fetch + + : invalid-cfg + : + { + +$clone_cfg + + : config-id + : + { + $clone_cfg; + $* libbaz --config-id 1 2>>/EOE != 0 + error: no configuration with id 1 is linked with cfg/ + EOE + } + + : config-name + : + { + $clone_cfg; + $* libbaz --config-name foo 2>>/EOE != 0 + error: no configuration with name 'foo' is linked with cfg/ + EOE + } + + : config-uuid + : + { + $clone_cfg; + $* libbaz --config-uuid '18f48b4b-b5d9-4712-b98c-1930df1c4228' 2>>/EOE != 0 + error: no configuration with uuid 18f48b4b-b5d9-4712-b98c-1930df1c4228 is linked with cfg/ + EOE + } + + : multiple + : + { + $clone_cfg; + $* libbaz --config-id 1 --config-name foo 2>>/EOE != 0 + error: multiple --config-* specified + EOE + } + } + + : baz + : + { + $clone_cfg; + $cfg_create -d cfg-bar-foo &cfg-bar-foo/***; + $cfg_link -d cfg cfg-bar-foo; + + $* libbaz ?libbar +{ --config-id 1 } ?libfoo +{ --config-id 1 } 2>>~%EOE%; + %fetched libfoo/1.1.0 \[cfg-bar-foo.\]% + %unpacked libfoo/1.1.0 \[cfg-bar-foo.\]% + %fetched libbar/1.1.0 \[cfg-bar-foo.\]% + %unpacked libbar/1.1.0 \[cfg-bar-foo.\]% + fetched libbaz/1.1.0 + unpacked libbaz/1.1.0 + %configured libfoo/1.1.0 \[cfg-bar-foo.\]% + %configured libbar/1.1.0 \[cfg-bar-foo.\]% + configured libbaz/1.1.0 + %info: cfg-bar-foo.+libfoo-1.1.0.+ is up to date% + %info: cfg-bar-foo.+libbar-1.1.0.+ is up to date% + %info: cfg[^-].+libbaz-1.1.0.+ is up to date% + %updated libfoo/1.1.0 \[cfg-bar-foo.\]% + %updated libbar/1.1.0 \[cfg-bar-foo.\]% + updated libbaz/1.1.0 + EOE + + $pkg_status -r libbaz >>/EOO; + !libbaz configured 1.1.0 + libbar [cfg-bar-foo/] configured 1.1.0 + libfoo [cfg-bar-foo/] configured 1.1.0 + libfoo [cfg-bar-foo/] configured 1.1.0 + EOO + + $pkg_status -d cfg-bar-foo -r libbar >>/EOO; + libbar configured 1.1.0 + libfoo configured 1.1.0 + EOO + + $pkg_status -d cfg-bar-foo libfoo >'libfoo configured 1.1.0'; + + $pkg_drop libbaz; + + $pkg_status libbaz libbar libfoo >>/EOO + libbaz available 1.1.0 + libbar available [1.1.0] + libfoo available [1.1.0] 1.0.0 + EOO + } + } + + : 3-configs + : + { + +$clone_root_cfg && $rep_add $rep/t4c && $rep_fetch + + : baz + : + { + uuid = '28f48b4b-b5d9-4712-b98c-1930df1c4228'; + + $clone_cfg; + $cfg_create -d cfg-bar &cfg-bar/***; + $cfg_create -d cfg-foo --config-uuid $uuid &cfg-foo/***; + + $cfg_link -d cfg cfg-bar; + $cfg_link -d cfg-bar cfg-foo; + + $* libbar@"$rep/t4b" -d cfg-bar ?libfoo +{ --config-id 2 } --trust-yes 2>>~%EOE%; + added pkg:build2.org/pkg-build/t4b + fetching pkg:build2.org/pkg-build/t4b + fetching pkg:build2.org/pkg-build/t4a (prerequisite of pkg:build2.org/pkg-build/t4b) + %fetched libfoo/1.1.0 \[cfg-foo.\]% + %unpacked libfoo/1.1.0 \[cfg-foo.\]% + fetched libbar/1.1.0 + unpacked libbar/1.1.0 + %configured libfoo/1.1.0 \[cfg-foo.\]% + configured libbar/1.1.0 + %info: cfg-foo.+libfoo-1.1.0.+ is up to date% + %info: cfg-bar.+libbar-1.1.0.+ is up to date% + %updated libfoo/1.1.0 \[cfg-foo.\]% + updated libbar/1.1.0 + EOE + + $* libfoo --config-uuid $uuid 2>>~%EOE%; + %info: cfg-foo.+libfoo-1.1.0.+ is up to date% + %updated libfoo/1.1.0 \[cfg-foo.\]% + EOE + + $* libbaz 2>>~%EOE%; + fetched libbaz/1.1.0 + unpacked libbaz/1.1.0 + configured libbaz/1.1.0 + %info: cfg[^-].+libbaz-1.1.0.+ is up to date% + updated libbaz/1.1.0 + EOE + + $pkg_status -r >>/EOO; + !libbaz configured 1.1.0 + !libbar [cfg-bar/] configured !1.1.0 + !libfoo [cfg-foo/] configured 1.1.0 + !libfoo [cfg-foo/] configured 1.1.0 + !libbar [cfg-bar/] configured !1.1.0 + !libfoo [cfg-foo/] configured 1.1.0 + !libfoo [cfg-foo/] configured 1.1.0 + EOO + + $pkg_drop libbaz; + + $* ?libfoo --config-uuid $uuid; # Unhold. + + $pkg_status libbaz libbar libfoo >>/EOO; + libbaz available 1.1.0 + !libbar [cfg-bar/] configured !1.1.0 + libfoo [cfg-foo/] configured 1.1.0 + EOO + + $* ?libbar +{ --config-id 1 } <'y' 2>>~%EOE%; + % drop libfoo/1.1.0 \[cfg-foo.\] \(unused\)% + % drop libbar/1.1.0 \[cfg-bar.\] \(unused\)% + %continue\? \[Y/n\] disfigured libbar/1.1.0 \[cfg-bar.\]% + %disfigured libfoo/1.1.0 \[cfg-foo.\]% + %purged libfoo/1.1.0 \[cfg-foo.\]% + %purged libbar/1.1.0 \[cfg-bar.\]% + EOE + + $pkg_status libbar libfoo >>/EOO + libbar available [1.1.0] + libfoo available [1.1.0] 1.0.0 + EOO + } + } + + : buildtime-dep + : + { + +$clone_root_cfg && $rep_add $rep/t7a && $rep_fetch + + : external-config + : + { + +$clone_cfg + +$cfg_create -d cfg2 --type host --name cfg2 &cfg2/*** + +$cfg_link -d cfg cfg2 + + : downgrade-dependency + : + { + $clone_cfg; + cp -pr ../cfg2 ./; + + $* libbar <'y' 2>>~%EOE%; + % new libbaz/1.0.0 \[cfg2.\] \(required by foo \[cfg2.\]\)% + % new foo/1.0.0 \[cfg2.\] \(required by libbar\)% + % new libbaz/1.0.0 \(required by libbar\)% + new libbar/1.0.0 + %continue\? \[Y/n\] fetched libbaz/1.0.0 \[cfg2.\]% + %unpacked libbaz/1.0.0 \[cfg2.\]% + %fetched foo/1.0.0 \[cfg2.\]% + %unpacked foo/1.0.0 \[cfg2.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[cfg2.\]% + %configured foo/1.0.0 \[cfg2.\]% + configured libbaz/1.0.0 + configured libbar/1.0.0 + %info: .+libbar-1.0.0.+ is up to date% + updated libbar/1.0.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.0.0 + foo [cfg2/] configured 1.0.0 + libbaz [cfg2/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + # While at it, make sure that from several available host + # configurations the selected package configuration is chosen and we + # don't fail with the 'multiple possible host configurations' + # diagnostics. + # + $cfg_create -d cfg3 --type host &cfg3/***; + $cfg_link -d cfg cfg3; + + $rep_add $rep/t7b && $rep_fetch; + + $* libbar <'y' 2>>~%EOE%; + % upgrade libbaz/1.1.0 \[cfg2.\] \(required by foo \[cfg2.\]\)% + % upgrade foo/1.1.0 \[cfg2.\] \(required by libbar\)% + upgrade libbar/1.1.0 + %continue\? \[Y/n\] disfigured libbar/1.0.0% + %disfigured foo/1.0.0 \[cfg2.\]% + %disfigured libbaz/1.0.0 \[cfg2.\]% + %fetched libbaz/1.1.0 \[cfg2.\]% + %unpacked libbaz/1.1.0 \[cfg2.\]% + %fetched foo/1.1.0 \[cfg2.\]% + %unpacked foo/1.1.0 \[cfg2.\]% + fetched libbar/1.1.0 + unpacked libbar/1.1.0 + %configured libbaz/1.1.0 \[cfg2.\]% + %configured foo/1.1.0 \[cfg2.\]% + configured libbar/1.1.0 + %info: .+libbar-1.1.0.+ is up to date% + updated libbar/1.1.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.1.0 + foo [cfg2/] configured 1.1.0 + libbaz [cfg2/] configured 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + EOO + + $* libbar/1.0.0 ?foo/1.0.0 +{ --config-name cfg2 } \ + ?libbaz/1.0.0 +{ --config-id 1 } <'y' 2>>~%EOE%; + % downgrade libbaz/1.0.0 \[cfg2.\]% + % downgrade foo/1.0.0 \[cfg2.\]% + downgrade libbar/1.0.0 + continue? [Y/n] disfigured libbar/1.1.0 + %disfigured foo/1.1.0 \[cfg2.\]% + %disfigured libbaz/1.1.0 \[cfg2.\]% + %fetched libbaz/1.0.0 \[cfg2.\]% + %unpacked libbaz/1.0.0 \[cfg2.\]% + %fetched foo/1.0.0 \[cfg2.\]% + %unpacked foo/1.0.0 \[cfg2.\]% + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[cfg2.\]% + %configured foo/1.0.0 \[cfg2.\]% + configured libbar/1.0.0 + %info: cfg2.+libbaz-1.0.0.+ is up to date% + %info: cfg2.+foo-1.0.0.+ is up to date% + %info: cfg.+libbar-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[cfg2.\]% + %updated foo/1.0.0 \[cfg2.\]% + updated libbar/1.0.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured !1.0.0 available 1.1.0 + foo [cfg2/] configured !1.0.0 available 1.1.0 + libbaz [cfg2/] configured !1.0.0 available 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + EOO + + $pkg_drop libbar libbaz + } + + : resolve-host-config + : + { + $clone_cfg; + cp -pr ../cfg2 ./; + + $cfg_create -d cfg3 --type host &cfg3/***; + $cfg_link -d cfg cfg3; + + $* libbar 2>>/~%EOE% != 0; + error: multiple possible host configurations for build-time dependency (foo ^1.0.0) + info: cfg2/ + info: cfg3/ + info: use --config-* to select the configuration + %info: while satisfying libbar.1.0.0% + EOE + + $* libbar ?foo +{ --config-id 2 } --yes 2>!; + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.0.0 + foo [cfg3/] configured 1.0.0 + libbaz [cfg3/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $pkg_drop libbar + } + + : 3-configs + : + { + $clone_cfg; + cp -pr ../cfg2 ./; + + $cfg_create -d cfg3 --type host &cfg3/***; + $cfg_link -d cfg2 cfg3; + + $rep_add -d cfg2 $rep/t7a && $rep_fetch -d cfg2; + + $* -d cfg2 libbaz +{ --config-id 2 } 2>!; + + $* libbar --yes 2>>~%EOE%; + %fetched foo/1.0.0 \[cfg2.\]% + %unpacked foo/1.0.0 \[cfg2.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured foo/1.0.0 \[cfg2.\]% + configured libbaz/1.0.0 + configured libbar/1.0.0 + %info: .+libbar-1.0.0.+ is up to date% + updated libbar/1.0.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.0.0 + foo [cfg2/] configured 1.0.0 + !libbaz [cfg3/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $pkg_drop libbar + } + } + + : private-config + : + { + $clone_cfg; + + $* libbar <'y' 2>>~%EOE% &cfg/.bpkg/host/***; + % new libbaz/1.0.0 \[cfg..bpkg.host.\] \(required by foo \[cfg..bpkg.host.\]\)% + % new foo/1.0.0 \[cfg..bpkg.host.\] \(required by libbar\)% + % new libbaz/1.0.0 \(required by libbar\)% + new libbar/1.0.0 + %continue\? \[Y/n\] fetched libbaz/1.0.0 \[cfg..bpkg.host.\]% + %unpacked libbaz/1.0.0 \[cfg..bpkg.host.\]% + %fetched foo/1.0.0 \[cfg..bpkg.host.\]% + %unpacked foo/1.0.0 \[cfg..bpkg.host.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[cfg..bpkg.host.\]% + %configured foo/1.0.0 \[cfg..bpkg.host.\]% + configured libbaz/1.0.0 + configured libbar/1.0.0 + %info: .+libbar-1.0.0.+ is up to date% + updated libbar/1.0.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.0.0 + foo [cfg/.bpkg/host/] configured 1.0.0 + libbaz [cfg/.bpkg/host/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $rep_add $rep/t7b && $rep_fetch; + + $* libbar <'y' 2>>~%EOE%; + % upgrade libbaz/1.1.0 \[cfg..bpkg.host.\] \(required by foo \[cfg..bpkg.host.\]\)% + % upgrade foo/1.1.0 \[cfg..bpkg.host.\] \(required by libbar\)% + upgrade libbar/1.1.0 + %continue\? \[Y/n\] disfigured libbar/1.0.0% + %disfigured foo/1.0.0 \[cfg..bpkg.host.\]% + %disfigured libbaz/1.0.0 \[cfg..bpkg.host.\]% + %fetched libbaz/1.1.0 \[cfg..bpkg.host.\]% + %unpacked libbaz/1.1.0 \[cfg..bpkg.host.\]% + %fetched foo/1.1.0 \[cfg..bpkg.host.\]% + %unpacked foo/1.1.0 \[cfg..bpkg.host.\]% + fetched libbar/1.1.0 + unpacked libbar/1.1.0 + %configured libbaz/1.1.0 \[cfg..bpkg.host.\]% + %configured foo/1.1.0 \[cfg..bpkg.host.\]% + configured libbar/1.1.0 + %info: .+libbar-1.1.0.+ is up to date% + updated libbar/1.1.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.1.0 + foo [cfg/.bpkg/host/] configured 1.1.0 + libbaz [cfg/.bpkg/host/] configured 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + EOO + + $pkg_drop libbar + } + + : self-hosted-config + : + { + $cfg_create -d cfg --type host &cfg/***; + $rep_add $rep/t7a && $rep_fetch; + + $* libbar <'y' 2>>~%EOE%; + new libbaz/1.0.0 (required by foo libbar) + new foo/1.0.0 (required by libbar) + new libbar/1.0.0 + continue? [Y/n] fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched foo/1.0.0 + unpacked foo/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + configured libbaz/1.0.0 + configured foo/1.0.0 + configured libbar/1.0.0 + %info: .+libbar-1.0.0.+ is up to date% + updated libbar/1.0.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.0.0 + foo configured 1.0.0 + libbaz configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $rep_add $rep/t7b && $rep_fetch; + + $* libbar <'y' 2>>~%EOE%; + upgrade libbaz/1.1.0 (required by foo libbar) + upgrade foo/1.1.0 (required by libbar) + upgrade libbar/1.1.0 + continue? [Y/n] disfigured libbar/1.0.0 + disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + fetched libbaz/1.1.0 + unpacked libbaz/1.1.0 + fetched foo/1.1.0 + unpacked foo/1.1.0 + fetched libbar/1.1.0 + unpacked libbar/1.1.0 + configured libbaz/1.1.0 + configured foo/1.1.0 + configured libbar/1.1.0 + %info: .+libbar-1.1.0.+ is up to date% + updated libbar/1.1.0 + EOE + + $pkg_status -r libbar >>/EOO; + !libbar configured 1.1.0 + foo configured 1.1.0 + libbaz configured 1.1.0 + libbaz configured 1.1.0 + EOO + + $pkg_drop libbar + } + } + + : verify-dependencies + : + { + +$clone_root_cfg && $rep_add $rep/t7a && $rep_fetch + + : fail + : + { + $cfg_create -d cfg2 &cfg2/***; + $rep_add -d cfg2 $rep/t7a && $rep_fetch -d cfg2; + + $cfg_create -d cfg3 &cfg3/***; + $rep_add -d cfg3 $rep/t7a && $rep_fetch -d cfg3; + + $* -d cfg2 --yes libbar 2>!; + $* -d cfg3 --yes libbox 2>!; + + $clone_cfg; + $cfg_link -d cfg cfg2; + $cfg_link -d cfg cfg3; + + $* libfix --yes 2>>~%EOE% != 0 + error: package libbaz indirectly required by libfix/1.0.0 is configured in multiple configurations + % info: libbaz/1.0.0 \[cfg3.\]% + % info: libbaz/1.0.0 \[cfg2.\]% + EOE + } + + : succeed + : + { + $cfg_create -d cfg2 &cfg2/***; + $rep_add -d cfg2 $rep/t7b && $rep_fetch -d cfg2; + + $cfg_create -d cfg3 &cfg3/***; + $rep_add -d cfg3 $rep/t7b && $rep_fetch -d cfg3; + + $* -d cfg2 --yes libbar 2>!; + $* -d cfg3 --yes libbox 2>!; + + $clone_cfg; + $cfg_link -d cfg cfg2; + $cfg_link -d cfg cfg3; + + $* libfix --yes 2>>~%EOE%; + fetched libfax/1.0.0 + unpacked libfax/1.0.0 + fetched libfix/1.0.0 + unpacked libfix/1.0.0 + configured libfax/1.0.0 + configured libfix/1.0.0 + %info: .+libfix-1.0.0.+ is up to date% + updated libfix/1.0.0 + EOE + + $pkg_drop libfix + } + } + + : change-config + : + { + : copy + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbaz --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbaz configured 1.0.0 + EOO + + $* -d t1 libbaz +{ --config-name t2 } 2>>~%EOE%; + %fetched libbaz/1.0.0 \[t2.\]% + %unpacked libbaz/1.0.0 \[t2.\]% + %configured libbaz/1.0.0 \[t2.\]% + %info: t2.+libbaz-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[t2.\]% + EOE + + $pkg_status -d t1 -r >>/EOO + !libbaz configured 1.0.0 + !libbaz [t2/] configured 1.0.0 + EOO + } + + : copy-unhold + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbaz --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbaz configured 1.0.0 + EOO + + $* -d t1 ?libbaz +{ --config-name t2 }; + + $pkg_status -d t1 -r >>/EOO + !libbaz configured 1.0.0 + EOO + } + + : copy-point + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbaz --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbaz configured 1.0.0 + EOO + + $* -d t1 foo libbaz +{ --config-name t2 } 2>>~%EOE%; + %fetched libbaz/1.0.0 \[t2.\]% + %unpacked libbaz/1.0.0 \[t2.\]% + fetched foo/1.0.0 + unpacked foo/1.0.0 + %configured libbaz/1.0.0 \[t2.\]% + configured foo/1.0.0 + %info: t2.+libbaz-1.0.0.+ is up to date% + %info: t1.+foo-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[t2.\]% + updated foo/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO + !libbaz configured 1.0.0 + !foo configured 1.0.0 + !libbaz [t2/] configured 1.0.0 + !libbaz [t2/] configured 1.0.0 + EOO + } + + : copy-unhold-point + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbaz --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbaz configured 1.0.0 + EOO + + $* -d t1 foo ?libbaz +{ --config-name t2 } 2>>~%EOE%; + %fetched libbaz/1.0.0 \[t2.\]% + %unpacked libbaz/1.0.0 \[t2.\]% + fetched foo/1.0.0 + unpacked foo/1.0.0 + %configured libbaz/1.0.0 \[t2.\]% + configured foo/1.0.0 + %info: t2.+libbaz-1.0.0.+ is up to date% + %info: t1.+foo-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[t2.\]% + updated foo/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO + !libbaz configured 1.0.0 + !foo configured 1.0.0 + libbaz [t2/] configured 1.0.0 + EOO + } + + : copy-repoint + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d t1 h1; + $cfg_link -d t1 h2; + + $cfg_link -d t2 h1; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + $rep_add -d t2 $rep/t7a && $rep_fetch -d t2; + + $* -d t1 libbar ?foo +{ --config-name h1 } <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[h1.\] \(required by foo \[h1.\]\)% + % new foo/1.0.0 \[h1.\]% + new libbaz/1.0.0 (required by libbar) + new libbar/1.0.0 + %continue\? \[Y/n\] fetched libbaz/1.0.0 \[h1.\]% + %unpacked libbaz/1.0.0 \[h1.\]% + %fetched foo/1.0.0 \[h1.\]% + %unpacked foo/1.0.0 \[h1.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[h1.\]% + %configured foo/1.0.0 \[h1.\]% + configured libbaz/1.0.0 + configured libbar/1.0.0 + %info: h1.+foo-1.0.0.+ is up to date% + %info: t1.+libbar-1.0.0.+ is up to date% + %updated foo/1.0.0 \[h1.\]% + updated libbar/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO; + !libbar configured 1.0.0 + foo [h1/] configured 1.0.0 + libbaz [h1/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d t2 libbox ?foo +{ --config-name h1 } <>~%EOE%; + y + EOI + % update foo/1.0.0 \[h1.\]% + new libbaz/1.0.0 (required by libbox) + new libbox/1.0.0 + continue? [Y/n] fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbox/1.0.0 + unpacked libbox/1.0.0 + configured libbaz/1.0.0 + configured libbox/1.0.0 + %info: h1.+foo-1.0.0.+ is up to date% + %info: t2.+libbox-1.0.0.+ is up to date% + %updated foo/1.0.0 \[h1.\]% + updated libbox/1.0.0 + EOE + + $pkg_status -d t2 -r >>/EOO; + !libbox configured 1.0.0 + foo [h1/] configured 1.0.0 + libbaz [h1/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d t1 ?foo +{ --config-name h2 } <>~%EOE%; + y + y + EOI + % new libbaz/1.0.0 \[h2.\] \(required by foo \[h2.\]\)% + % new foo/1.0.0 \[h2.\]% + % reconfigure libbar/1.0.0 \(dependent of foo \[h2.\]\)% + continue? [Y/n] update dependent packages? [Y/n] disfigured libbar/1.0.0 + %fetched libbaz/1.0.0 \[h2.\]% + %unpacked libbaz/1.0.0 \[h2.\]% + %fetched foo/1.0.0 \[h2.\]% + %unpacked foo/1.0.0 \[h2.\]% + %configured libbaz/1.0.0 \[h2.\]% + %configured foo/1.0.0 \[h2.\]% + configured libbar/1.0.0 + %info: h2.+foo-1.0.0.+ is up to date% + %info: t1.+libbar-1.0.0.+ is up to date% + %updated foo/1.0.0 \[h2.\]% + updated libbar/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO; + !libbar configured 1.0.0 + foo [h2/] configured 1.0.0 + libbaz [h2/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $pkg_status -d t2 -r >>/EOO + !libbox configured 1.0.0 + foo [h1/] configured 1.0.0 + libbaz [h1/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + } + + : copy-repoint-drop + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 foo --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !foo configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d t1 libbaz +{ --config-name t2 } <>~%EOE%; + y + y + EOI + % new libbaz/1.0.0 \[t2.\]% + drop libbaz/1.0.0 (unused) + % reconfigure foo/1.0.0 \(dependent of libbaz \[t2.\]\)% + continue? [Y/n] update dependent packages? [Y/n] disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + %fetched libbaz/1.0.0 \[t2.\]% + %unpacked libbaz/1.0.0 \[t2.\]% + purged libbaz/1.0.0 + %configured libbaz/1.0.0 \[t2.\]% + configured foo/1.0.0 + %info: t2.+libbaz-1.0.0.+ is up to date% + %info: t1.+foo-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[t2.\]% + updated foo/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO + !foo configured 1.0.0 + !libbaz [t2/] configured 1.0.0 + !libbaz [t2/] configured 1.0.0 + EOO + } + + : drop-repointed + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 foo --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !foo configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d t1 ?foo libbaz +{ --config-name t2 } <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[t2.\]% + drop libbaz/1.0.0 (unused) + drop foo/1.0.0 (unused) + continue? [Y/n] disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + %fetched libbaz/1.0.0 \[t2.\]% + %unpacked libbaz/1.0.0 \[t2.\]% + purged libbaz/1.0.0 + purged foo/1.0.0 + %configured libbaz/1.0.0 \[t2.\]% + %info: t2.+libbaz-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[t2.\]% + EOE + + $pkg_status -d t1 -r >>/EOO + !libbaz [t2/] configured 1.0.0 + EOO + } + + : dependency-repointed + : + { + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d h1 h2; + + $rep_add -d h1 $rep/t7a && $rep_fetch -d h1; + + $* -d h1 foo --yes 2>!; + + $pkg_status -d h1 -r >>/EOO; + !foo configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d h1 libbar libbaz +{ --config-name h2 } <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[h2.\]% + drop libbaz/1.0.0 (unused) + reconfigure/update foo/1.0.0 (required by libbar) + new libbar/1.0.0 + continue? [Y/n] disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + %fetched libbaz/1.0.0 \[h2.\]% + %unpacked libbaz/1.0.0 \[h2.\]% + purged libbaz/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[h2.\]% + configured foo/1.0.0 + configured libbar/1.0.0 + %info: h2.+libbaz-1.0.0.+ is up to date% + %info: h1.+libbar-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[h2.\]% + updated libbar/1.0.0 + EOE + + $pkg_status -d h1 -r >>/EOO + !foo configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + !libbar configured 1.0.0 + !foo configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + EOO + } + + : dependency-repointed-system + : + { + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d h1 h2; + + $rep_add -d h1 $rep/t7a && $rep_fetch -d h1; + + $* -d h1 foo --yes 2>!; + + $pkg_status -d h1 -r >>/EOO; + !foo configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d h1 libbar '?sys:foo/1.2.0' ?libbaz +{ --config-name h2 } <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[h2.\]% + drop libbaz/1.0.0 (unused) + reconfigure/unhold sys:foo/1.2.0 + new libbar/1.0.0 + continue? [Y/n] disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + %fetched libbaz/1.0.0 \[h2.\]% + %unpacked libbaz/1.0.0 \[h2.\]% + purged libbaz/1.0.0 + purged foo/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[h2.\]% + configured sys:foo/1.2.0 + configured libbar/1.0.0 + %info: h2.+libbaz-1.0.0.+ is up to date% + %info: h1.+libbar-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[h2.\]% + updated libbar/1.0.0 + EOE + + $pkg_status -d h1 -r >>/EOO; + !libbar configured 1.0.0 + foo configured,system !1.2.0 + libbaz [h2/] configured 1.0.0 + EOO + + $* -d h1 ?foo ?libbaz <>~%EOE%; + y + y + EOI + % drop libbaz/1.0.0 \[h2.\] \(unused\)% + new libbaz/1.0.0 + downgrade foo/1.0.0 + reconfigure libbar/1.0.0 (dependent of libbaz) + continue? [Y/n] update dependent packages? [Y/n] disfigured libbar/1.0.0 + purged foo/1.2.0 + %disfigured libbaz/1.0.0 \[h2.\]% + %purged libbaz/1.0.0 \[h2.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched foo/1.0.0 + unpacked foo/1.0.0 + configured libbaz/1.0.0 + configured foo/1.0.0 + configured libbar/1.0.0 + %info: h1.+libbaz-1.0.0.+ is up to date% + %info: h1.+foo-1.0.0.+ is up to date% + %info: h1.+libbar-1.0.0.+ is up to date% + updated libbaz/1.0.0 + updated foo/1.0.0 + updated libbar/1.0.0 + EOE + + $pkg_status -d h1 -r >>/EOO + !libbar configured 1.0.0 + foo configured 1.0.0 + libbaz configured 1.0.0 + libbaz configured 1.0.0 + EOO + } + + : orphan-repointed + : + { + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d h1 h2; + + $rep_add -d h1 $rep/t7b && $rep_fetch -d h1; + + $* -d h1 foo --yes 2>!; + + $rep_remove -d h1 $rep/t7b; + $rep_add -d h1 $rep/t7a && $rep_fetch -d h1; + + $* -d h1 libbaz +{ --config-name h2 } 2>>EOE != 0 + error: package foo/1.1.0 is orphaned + info: explicitly upgrade it to a new version + info: while satisfying foo/1.1.0 + EOE + } + + : unhold-repointed + : + { + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d h1 h2; + + $rep_add -d h1 $rep/t7a && $rep_fetch -d h1; + + $* -d h1 foo --yes 2>!; + + $pkg_status -d h1 -r >>/EOO; + !foo configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $* -d h1 libbar ?foo libbaz +{ --config-name h2 } <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[h2.\]% + drop libbaz/1.0.0 (unused) + reconfigure/update/unhold foo/1.0.0 + new libbar/1.0.0 + continue? [Y/n] disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + %fetched libbaz/1.0.0 \[h2.\]% + %unpacked libbaz/1.0.0 \[h2.\]% + purged libbaz/1.0.0 + fetched libbar/1.0.0 + unpacked libbar/1.0.0 + %configured libbaz/1.0.0 \[h2.\]% + configured foo/1.0.0 + configured libbar/1.0.0 + %info: h2.+libbaz-1.0.0.+ is up to date% + %info: h1.+foo-1.0.0.+ is up to date% + %info: h1.+libbar-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[h2.\]% + updated foo/1.0.0 + updated libbar/1.0.0 + EOE + + $pkg_status -d h1 -r >>/EOO + !libbar configured 1.0.0 + foo configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + !libbaz [h2/] configured 1.0.0 + EOO + } + + : satisfy + : + { + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d h1 h2; + + $rep_add -d h2 $rep/t7b && $rep_fetch -d h2; + $* -d h2 foo --yes 2>!; + + $rep_add -d h1 $rep/t7a && $rep_fetch -d h1; + + $* -d h1 foo ?libbaz 2>>~%EOE%; + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched foo/1.0.0 + unpacked foo/1.0.0 + configured libbaz/1.0.0 + configured foo/1.0.0 + %info: h1.+libbaz-1.0.0.+ is up to date% + %info: h1.+foo-1.0.0.+ is up to date% + updated libbaz/1.0.0 + updated foo/1.0.0 + EOE + + $pkg_status -d h1 -r >>/EOO; + !foo configured 1.0.0 + libbaz configured 1.0.0 + !foo [h2/] configured 1.1.0 + libbaz [h2/] configured 1.1.0 + EOO + + $* -d h1 ?libbaz/1.0.0 +{ --config-name h2 } 2>>~%EOE% != 0; + %error: unable to downgrade package libbaz/1.1.0 \[h2.\] to 1.0.0% + % info: because package foo \[h2.\] depends on \(libbaz \^1.1.0\)% + info: explicitly request up/downgrade of package foo + info: or explicitly specify package libbaz version to manually satisfy these constraints + EOE + + $* -d h1 ?libbaz +{ --config-name h2 } <>~%EOE%; + y + n + EOI + % update libbaz/1.1.0 \[h2.\]% + drop libbaz/1.0.0 (unused) + % reconfigure foo/1.0.0 \(dependent of libbaz \[h2.\]\)% + continue? [Y/n] update dependent packages? [Y/n] disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + purged libbaz/1.0.0 + configured foo/1.0.0 + %info: h2.+libbaz-1.1.0.+ is up to date% + %updated libbaz/1.1.0 \[h2.\]% + EOE + + $pkg_status -d h1 -r >>/EOO + !foo configured 1.0.0 + libbaz [h2/] configured 1.1.0 + !foo [h2/] configured 1.1.0 + libbaz [h2/] configured 1.1.0 + EOO + } + + : upgrade-repointed + : + { + $cfg_create -d t1 --name t1 &t1/***; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbar --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbar configured 1.0.0 + foo [t1/.bpkg/host/] configured 1.0.0 + libbaz [t1/.bpkg/host/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $cfg_create -d h1 --type host --name h1 &h1/***; + + $cfg_link -d t1 h1 2>!; + + $rep_add -d t1 $rep/t7b && $rep_fetch -d t1; + + $* -d t1 libbar ?foo +{ --config-name h1 } <>~%EOE%; + y + EOI + % new libbaz/1.1.0 \[h1.\] \(required by foo \[h1.\]\)% + % new foo/1.1.0 \[h1.\]% + % drop libbaz/1.0.0 \[t1..bpkg.host.\] \(unused\)% + % drop foo/1.0.0 \[t1..bpkg.host.\] \(unused\)% + upgrade libbar/1.1.0 + continue? [Y/n] disfigured libbar/1.0.0 + %disfigured foo/1.0.0 \[t1..bpkg.host.\]% + %disfigured libbaz/1.0.0 \[t1..bpkg.host.\]% + %fetched libbaz/1.1.0 \[h1.\]% + %unpacked libbaz/1.1.0 \[h1.\]% + %fetched foo/1.1.0 \[h1.\]% + %unpacked foo/1.1.0 \[h1.\]% + %purged libbaz/1.0.0 \[t1..bpkg.host.\]% + %purged foo/1.0.0 \[t1..bpkg.host.\]% + fetched libbar/1.1.0 + unpacked libbar/1.1.0 + %configured libbaz/1.1.0 \[h1.\]% + %configured foo/1.1.0 \[h1.\]% + configured libbar/1.1.0 + %info: h1.+foo-1.1.0.+ is up to date% + %info: t1.+libbar-1.1.0.+ is up to date% + %updated foo/1.1.0 \[h1.\]% + updated libbar/1.1.0 + EOE + + $pkg_status -d t1 -r >>/EOO + !libbar configured 1.1.0 + foo [h1/] configured 1.1.0 + libbaz [h1/] configured 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + EOO + } + + : upgrade-repointed-dependency + : + { + $cfg_create -d h1 --type host --name h1 &h1/***; + $cfg_create -d h2 --type host --name h2 &h2/***; + + $cfg_link -d h1 h2; + + $rep_add -d h1 $rep/t7a && $rep_fetch -d h1; + + $* -d h1 libbar --yes 2>!; + + $pkg_status -d h1 -r >>/EOO; + !libbar configured 1.0.0 + foo configured 1.0.0 + libbaz configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $rep_add -d h1 $rep/t7b && $rep_fetch -d h1; + + $* -d h1 libbar ?foo ?libbaz +{ --config-name h2 } <>~%EOE%; + y + y + EOI + % new libbaz/1.1.0 \[h2.\]% + drop libbaz/1.0.0 (unused) + upgrade foo/1.1.0 + upgrade libbar/1.1.0 + continue? [Y/n] disfigured libbar/1.0.0 + disfigured foo/1.0.0 + disfigured libbaz/1.0.0 + %fetched libbaz/1.1.0 \[h2.\]% + %unpacked libbaz/1.1.0 \[h2.\]% + purged libbaz/1.0.0 + fetched foo/1.1.0 + unpacked foo/1.1.0 + fetched libbar/1.1.0 + unpacked libbar/1.1.0 + %configured libbaz/1.1.0 \[h2.\]% + configured foo/1.1.0 + configured libbar/1.1.0 + %info: h2.+libbaz-1.1.0.+ is up to date% + %info: h1.+foo-1.1.0.+ is up to date% + %info: h1.+libbar-1.1.0.+ is up to date% + %updated libbaz/1.1.0 \[h2.\]% + updated foo/1.1.0 + updated libbar/1.1.0 + EOE + + $pkg_status -d h1 -r >>/EOO + !libbar configured 1.1.0 + foo configured 1.1.0 + libbaz [h2/] configured 1.1.0 + libbaz [h2/] configured 1.1.0 + EOO + } + + : upgrade-prerequisite-replacement + : + { + $cfg_create -d t1 --name t1 &t1/***; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbar --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbar configured 1.0.0 + foo [t1/.bpkg/host/] configured 1.0.0 + libbaz [t1/.bpkg/host/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $cfg_create -d t2 --name t2 &t2/***; + + $rep_add -d t2 $rep/t7a && $rep_fetch -d t2; + + $* -d t2 libbaz --yes 2>!; + + $cfg_link -d t1 t2 2>!; + + $rep_add -d t1 $rep/t7b && $rep_fetch -d t1; + + $* -d t1 libbaz +{ --config-name t2 } <>~%EOE%; + y + y + EOI + % upgrade libbaz/1.1.0 \[t2.\]% + drop libbaz/1.0.0 (unused) + % reconfigure libbar/1.0.0 \(dependent of libbaz \[t2.\]\)% + continue? [Y/n] update dependent packages? [Y/n] disfigured libbar/1.0.0 + disfigured libbaz/1.0.0 + %disfigured libbaz/1.0.0 \[t2.\]% + %fetched libbaz/1.1.0 \[t2.\]% + %unpacked libbaz/1.1.0 \[t2.\]% + purged libbaz/1.0.0 + %configured libbaz/1.1.0 \[t2.\]% + configured libbar/1.0.0 + %info: t2.+libbaz-1.1.0.+ is up to date% + %info: t1.+libbar-1.0.0.+ is up to date% + %updated libbaz/1.1.0 \[t2.\]% + updated libbar/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO + !libbar configured 1.0.0 available 1.1.0 + foo [t1/.bpkg/host/] configured 1.0.0 available 1.1.0 + libbaz [t1/.bpkg/host/] configured 1.0.0 available 1.1.0 + !libbaz [t2/] configured 1.1.0 + !libbaz [t2/] configured 1.1.0 + EOO + } + + : copy-upgrade-dependency-tree + : + { + $cfg_create -d t1 --name t1 &t1/***; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libbar --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libbar configured 1.0.0 + foo [t1/.bpkg/host/] configured 1.0.0 + libbaz [t1/.bpkg/host/] configured 1.0.0 + libbaz configured 1.0.0 + EOO + + $cfg_create -d t2 --name t2 &t2/***; + + $cfg_link -d t1 t2 2>!; + + $rep_add -d t1 $rep/t7b && $rep_fetch -d t1; + + $* -d t1 libbar +{ --config-name t2 } <>~%EOE%; + y + EOI + % new libbaz/1.1.0 \[t2..bpkg.host.\] \(required by foo \[t2..bpkg.host.\]\)% + % new foo/1.1.0 \[t2..bpkg.host.\] \(required by libbar \[t2.\]\)% + % new libbaz/1.1.0 \[t2.\] \(required by libbar \[t2.\]\)% + % new libbar/1.1.0 \[t2.\]% + %continue\? \[Y/n\] fetched libbaz/1.1.0 \[t2..bpkg.host.\]% + %unpacked libbaz/1.1.0 \[t2..bpkg.host.\]% + %fetched foo/1.1.0 \[t2..bpkg.host.\]% + %unpacked foo/1.1.0 \[t2..bpkg.host.\]% + %fetched libbaz/1.1.0 \[t2.\]% + %unpacked libbaz/1.1.0 \[t2.\]% + %fetched libbar/1.1.0 \[t2.\]% + %unpacked libbar/1.1.0 \[t2.\]% + %configured libbaz/1.1.0 \[t2..bpkg.host.\]% + %configured foo/1.1.0 \[t2..bpkg.host.\]% + %configured libbaz/1.1.0 \[t2.\]% + %configured libbar/1.1.0 \[t2.\]% + %info: t2.+libbar-1.1.0.+ is up to date% + %updated libbar/1.1.0 \[t2.\]% + EOE + + $pkg_status -d t1 -r >>/EOO + !libbar configured 1.0.0 available 1.1.0 + foo [t1/.bpkg/host/] configured 1.0.0 available 1.1.0 + libbaz [t1/.bpkg/host/] configured 1.0.0 available 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + !libbar [t2/] configured 1.1.0 + foo [t2/.bpkg/host/] configured 1.1.0 + libbaz [t2/.bpkg/host/] configured 1.1.0 + libbaz [t2/] configured 1.1.0 + EOO + } + + : repointed-dependent-indirect-dependency-upgrade + : + { + $cfg_create -d t1 --name t1 &t1/***; + $cfg_create -d t2 --name t2 &t2/***; + $cfg_create -d h1 --name h1 --type host &h1/***; + + $cfg_link -d t1 t2 2>!; + $cfg_link -d t1 h1 2>!; + $cfg_link -d t2 h1 2>!; + + $rep_add -d t1 $rep/t7a && $rep_fetch -d t1; + + $* -d t1 libfix --yes 2>!; + + $pkg_status -d t1 -r >>/EOO; + !libfix configured 1.0.0 + libbar configured 1.0.0 + foo [h1/] configured 1.0.0 + libbaz [h1/] configured 1.0.0 + libbaz configured 1.0.0 + libbox configured 1.0.0 + foo [h1/] configured 1.0.0 + libbaz [h1/] configured 1.0.0 + libbaz configured 1.0.0 + libfax configured 1.0.0 + EOO + + $rep_add -d t1 $rep/t7b && $rep_fetch -d t1; + + $* -d t1 libfix libfax +{ --config-name t2 } foo +{ --config-name h1 } <>~%EOE%; + y + y + EOI + % new libfax/1.0.0 \[t2.\]% + % upgrade libbaz/1.1.0 \[h1.\] \(required by foo \[h1.\]\)% + % upgrade foo/1.1.0 \[h1.\]% + % reconfigure libbox \(dependent of foo \[h1.\]\)% + % reconfigure libbar \(dependent of foo \[h1.\]\)% + % drop libfax/1.0.0 \(unused\)% + reconfigure/update libfix/1.0.0 + continue? [Y/n] update dependent packages? [Y/n] disfigured libfix/1.0.0 + disfigured libfax/1.0.0 + disfigured libbar/1.0.0 + disfigured libbox/1.0.0 + %disfigured foo/1.0.0 \[h1.\]% + %disfigured libbaz/1.0.0 \[h1.\]% + %fetched libfax/1.0.0 \[t2.\]% + %unpacked libfax/1.0.0 \[t2.\]% + %fetched libbaz/1.1.0 \[h1.\]% + %unpacked libbaz/1.1.0 \[h1.\]% + %fetched foo/1.1.0 \[h1.\]% + %unpacked foo/1.1.0 \[h1.\]% + purged libfax/1.0.0 + %configured libfax/1.0.0 \[t2.\]% + %configured libbaz/1.1.0 \[h1.\]% + %configured foo/1.1.0 \[h1.\]% + configured libbox/1.0.0 + configured libbar/1.0.0 + configured libfix/1.0.0 + %info: t2.+libfax-1.0.0.+ is up to date% + %info: h1.+foo-1.1.0.+ is up to date% + %info: t1.+libfix-1.0.0.+ is up to date% + %info: t1.+libbox-1.0.0.+ is up to date% + %info: t1.+libbar-1.0.0.+ is up to date% + %updated libfax/1.0.0 \[t2.\]% + %updated foo/1.1.0 \[h1.\]% + updated libfix/1.0.0 + updated libbox/1.0.0 + updated libbar/1.0.0 + EOE + + $pkg_status -d t1 -r >>/EOO + !libfix configured 1.0.0 + libbar configured 1.0.0 available 1.1.0 + !foo [h1/] configured 1.1.0 + libbaz [h1/] configured 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + libbox configured 1.0.0 available 1.1.0 + !foo [h1/] configured 1.1.0 + libbaz [h1/] configured 1.1.0 + libbaz configured 1.0.0 available 1.1.0 + !libfax [t2/] configured 1.0.0 + !libfax [t2/] configured 1.0.0 + !foo [h1/] configured 1.1.0 + libbaz [h1/] configured 1.1.0 + EOO + } + } + + : build2-module-dep + : + { + +$clone_root_cfg && $rep_add $rep/t7a && $rep_fetch + + : private-config + : + { + $clone_cfg; + + $* libbiz <>~%EOE% &cfg/.bpkg/build2/*** &cfg/.bpkg/host/***; + y + EOI + % new libbaz/1.0.0 \[cfg..bpkg.host.\] \(required by foo \[cfg..bpkg.host.\]\)% + % new foo/1.0.0 \[cfg..bpkg.host.\] \(required by libbiz\)% + % new libbaz/1.0.0 \[cfg..bpkg.build2..bpkg.host.\] \(required by foo \[cfg..bpkg.build2..bpkg.host.\]\)% + % new foo/1.0.0 \[cfg..bpkg.build2..bpkg.host.\] \(required by libbuild2-foo \[cfg..bpkg.build2.\]\)% + % new libbuild2-bar/1.0.0 \[cfg..bpkg.build2.\] \(required by libbuild2-foo \[cfg..bpkg.build2.\]\)% + % new libbaz/1.0.0 \[cfg..bpkg.build2.\] \(required by libbuild2-foo \[cfg..bpkg.build2.\]\)% + % new libbuild2-foo/1.0.0 \[cfg..bpkg.build2.\] \(required by libbiz\)% + new libbaz/1.0.0 (required by libbiz) + new libbiz/1.0.0 + %continue\? \[Y/n\] fetched libbaz/1.0.0 \[cfg..bpkg.host.\]% + %unpacked libbaz/1.0.0 \[cfg..bpkg.host.\]% + %fetched foo/1.0.0 \[cfg..bpkg.host.\]% + %unpacked foo/1.0.0 \[cfg..bpkg.host.\]% + %fetched libbaz/1.0.0 \[cfg..bpkg.build2..bpkg.host.\]% + %unpacked libbaz/1.0.0 \[cfg..bpkg.build2..bpkg.host.\]% + %fetched foo/1.0.0 \[cfg..bpkg.build2..bpkg.host.\]% + %unpacked foo/1.0.0 \[cfg..bpkg.build2..bpkg.host.\]% + %fetched libbuild2-bar/1.0.0 \[cfg..bpkg.build2.\]% + %unpacked libbuild2-bar/1.0.0 \[cfg..bpkg.build2.\]% + %fetched libbaz/1.0.0 \[cfg..bpkg.build2.\]% + %unpacked libbaz/1.0.0 \[cfg..bpkg.build2.\]% + %fetched libbuild2-foo/1.0.0 \[cfg..bpkg.build2.\]% + %unpacked libbuild2-foo/1.0.0 \[cfg..bpkg.build2.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbiz/1.0.0 + unpacked libbiz/1.0.0 + %configured libbaz/1.0.0 \[cfg..bpkg.host.\]% + %configured foo/1.0.0 \[cfg..bpkg.host.\]% + %configured libbaz/1.0.0 \[cfg..bpkg.build2..bpkg.host.\]% + %configured foo/1.0.0 \[cfg..bpkg.build2..bpkg.host.\]% + %configured libbuild2-bar/1.0.0 \[cfg..bpkg.build2.\]% + %configured libbaz/1.0.0 \[cfg..bpkg.build2.\]% + %configured libbuild2-foo/1.0.0 \[cfg..bpkg.build2.\]% + configured libbaz/1.0.0 + configured libbiz/1.0.0 + %info: cfg.+libbiz-1.0.0.+ is up to date% + updated libbiz/1.0.0 + EOE + + $pkg_status -d cfg -r >>/EOO; + !libbiz configured 1.0.0 + foo [cfg/.bpkg/host/] configured 1.0.0 + libbaz [cfg/.bpkg/host/] configured 1.0.0 + libbaz configured 1.0.0 + libbuild2-foo [cfg/.bpkg/build2/] configured 1.0.0 + foo [cfg/.bpkg/build2/.bpkg/host/] configured 1.0.0 + libbaz [cfg/.bpkg/build2/.bpkg/host/] configured 1.0.0 + libbaz [cfg/.bpkg/build2/] configured 1.0.0 + libbuild2-bar [cfg/.bpkg/build2/] configured 1.0.0 + EOO + + $pkg_drop libbiz + } + + : external-config + : + { + $clone_cfg; + + $cfg_create -d cfg2 --type build2 --name cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $cfg_create -d cfg3 --type host --name cfg3 &cfg3/***; + $cfg_link -d cfg cfg3; + $cfg_link -d cfg2 cfg3; + + $* libbiz <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[cfg3.\] \(required by foo \[cfg3.\]\)% + % new foo/1.0.0 \[cfg3.\] \(required by libbiz libbuild2-foo \[cfg2.\]\)% + % new libbuild2-bar/1.0.0 \[cfg2.\] \(required by libbuild2-foo \[cfg2.\]\)% + % new libbaz/1.0.0 \[cfg2.\] \(required by libbuild2-foo \[cfg2.\]\)% + % new libbuild2-foo/1.0.0 \[cfg2.\] \(required by libbiz\)% + new libbaz/1.0.0 (required by libbiz) + new libbiz/1.0.0 + %continue\? \[Y/n\] fetched libbaz/1.0.0 \[cfg3.\]% + %unpacked libbaz/1.0.0 \[cfg3.\]% + %fetched foo/1.0.0 \[cfg3.\]% + %unpacked foo/1.0.0 \[cfg3.\]% + %fetched libbuild2-bar/1.0.0 \[cfg2.\]% + %unpacked libbuild2-bar/1.0.0 \[cfg2.\]% + %fetched libbaz/1.0.0 \[cfg2.\]% + %unpacked libbaz/1.0.0 \[cfg2.\]% + %fetched libbuild2-foo/1.0.0 \[cfg2.\]% + %unpacked libbuild2-foo/1.0.0 \[cfg2.\]% + fetched libbaz/1.0.0 + unpacked libbaz/1.0.0 + fetched libbiz/1.0.0 + unpacked libbiz/1.0.0 + %configured libbaz/1.0.0 \[cfg3.\]% + %configured foo/1.0.0 \[cfg3.\]% + %configured libbuild2-bar/1.0.0 \[cfg2.\]% + %configured libbaz/1.0.0 \[cfg2.\]% + %configured libbuild2-foo/1.0.0 \[cfg2.\]% + configured libbaz/1.0.0 + configured libbiz/1.0.0 + %info: cfg.+libbiz-1.0.0.+ is up to date% + updated libbiz/1.0.0 + EOE + + $pkg_status -d cfg -r >>/EOO; + !libbiz configured 1.0.0 + foo [cfg3/] configured 1.0.0 + libbaz [cfg3/] configured 1.0.0 + libbaz configured 1.0.0 + libbuild2-foo [cfg2/] configured 1.0.0 + foo [cfg3/] configured 1.0.0 + libbaz [cfg3/] configured 1.0.0 + libbaz [cfg2/] configured 1.0.0 + libbuild2-bar [cfg2/] configured 1.0.0 + EOO + + $pkg_drop libbiz + } + + : build2-config + : + { + $cfg_create -d cfg --type build2 &cfg/***; + $rep_add $rep/t7a && $rep_fetch; + + $* libbiz 2>>~%EOE% != 0; + %error: unable to build build system module libbuild2-foo in its dependent package configuration cfg.% + info: use --config-* to select suitable configuration + info: while satisfying libbiz/1.0.0 + EOE + + $cfg_create -d cfg2 --type build2 --name cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $cfg_create -d cfg3 --type host --name cfg3 &cfg3/***; + $cfg_link -d cfg cfg3; + $cfg_link -d cfg2 cfg3; + + $* libbiz ?libbuild2-foo +{ --config-name cfg2 } \ + ?libbaz +{ --config-name cfg2 } <>~%EOE%; + y + EOI + % new libbaz/1.0.0 \[cfg3.\] \(required by foo \[cfg3.\]\)% + % new foo/1.0.0 \[cfg3.\] \(required by libbiz libbuild2-foo \[cfg2.\]\)% + % new libbuild2-bar/1.0.0 \[cfg2.\] \(required by libbuild2-foo \[cfg2.\]\)% + % new libbaz/1.0.0 \[cfg2.\]% + % new libbuild2-foo/1.0.0 \[cfg2.\]% + new libbiz/1.0.0 + %continue\? \[Y/n\] fetched libbaz/1.0.0 \[cfg3.\]% + %unpacked libbaz/1.0.0 \[cfg3.\]% + %fetched foo/1.0.0 \[cfg3.\]% + %unpacked foo/1.0.0 \[cfg3.\]% + %fetched libbuild2-bar/1.0.0 \[cfg2.\]% + %unpacked libbuild2-bar/1.0.0 \[cfg2.\]% + %fetched libbaz/1.0.0 \[cfg2.\]% + %unpacked libbaz/1.0.0 \[cfg2.\]% + %fetched libbuild2-foo/1.0.0 \[cfg2.\]% + %unpacked libbuild2-foo/1.0.0 \[cfg2.\]% + fetched libbiz/1.0.0 + unpacked libbiz/1.0.0 + %configured libbaz/1.0.0 \[cfg3.\]% + %configured foo/1.0.0 \[cfg3.\]% + %configured libbuild2-bar/1.0.0 \[cfg2.\]% + %configured libbaz/1.0.0 \[cfg2.\]% + %configured libbuild2-foo/1.0.0 \[cfg2.\]% + configured libbiz/1.0.0 + %info: cfg2.+libbaz-1.0.0.+ is up to date% + %info: cfg2.+libbuild2-foo-1.0.0.+ is up to date% + %info: cfg.+libbiz-1.0.0.+ is up to date% + %updated libbaz/1.0.0 \[cfg2.\]% + %updated libbuild2-foo/1.0.0 \[cfg2.\]% + updated libbiz/1.0.0 + EOE + + $pkg_status -d cfg -r >>/EOO; + !libbiz configured 1.0.0 + foo [cfg3/] configured 1.0.0 + libbaz [cfg3/] configured 1.0.0 + libbaz [cfg2/] configured 1.0.0 + libbuild2-foo [cfg2/] configured 1.0.0 + foo [cfg3/] configured 1.0.0 + libbaz [cfg3/] configured 1.0.0 + libbaz [cfg2/] configured 1.0.0 + libbuild2-bar [cfg2/] configured 1.0.0 + EOO + + $pkg_drop libbiz + } + + : duplicates + : + { + $cfg_create -d cfg &cfg/***; + $rep_add $rep/t7a && $rep_fetch; + + $cfg_create -d cfg2 --name cfg2 &cfg2/***; + $cfg_link -d cfg cfg2; + + $cfg_create -d cfg3 --name cfg3 &cfg3/***; + $cfg_link -d cfg cfg3; + + $* libbiz +{ --config-name cfg2 } --yes 2>!; + $* libbuz +{ --config-name cfg3 } --yes 2>!; + + $* libbix 2>>/~%EOE% != 0 + error: building build system module libbuild2-bar in multiple configurations + % info: cfg(2|3)/.bpkg/build2/%{2} + EOE + } + } +} -- cgit v1.1