diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-17 16:14:33 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-01-17 20:54:14 +0300 |
commit | 8a78fc1c0420824e59b00c6b9bf6ade9cd7d3d5b (patch) | |
tree | a44cf6c501667df2899939f09b1ac11e606b0301 /tests | |
parent | 25616b791461608b082291dda431d8247fe8fb21 (diff) |
Fix building local package against local prerequisite package
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pkg-build.test | 46 | ||||
-rw-r--r-- | tests/pkg-system.test | 8 |
2 files changed, 52 insertions, 2 deletions
diff --git a/tests/pkg-build.test b/tests/pkg-build.test index 17a529c..005aea0 100644 --- a/tests/pkg-build.test +++ b/tests/pkg-build.test @@ -1029,6 +1029,52 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! $pkg_disfigure libfoo 2>'disfigured libfoo/1.0.0'; $pkg_purge libfoo 2>'purged libfoo/1.0.0' } + + : local-prerequisite + : + : Test that the local package can be built against the local prerequisite + : package. + : + { + # Prepare libbar and libbaz (libbaz->libbar) local packages using the + # temporary configuration. + # + $clone_root_cfg; + $pkg_fetch -e $src/t4b/libbar-1.1.0.tar.gz && $pkg_unpack libbar; + cp -r cfg/libbar-1.1.0 libbar; + $pkg_fetch -e $src/t4c/libbaz-1.1.0.tar.gz && $pkg_unpack libbaz; + cp -r cfg/libbaz-1.1.0 libbaz; + rm -r cfg; + + $clone_root_cfg && $rep_add $rep/t4a && $rep_fetch; + + $* ./libbar/ 2>>~%EOE%; + %.* + %.*fetched libfoo/1.1.0% + unpacked libfoo/1.1.0 + unpacked libbar/1.1.0 + configured libfoo/1.1.0 + configured libbar/1.1.0 + info: cfg/dir{libbar-1.1.0/} is up to date + updated libbar/1.1.0 + EOE + + $* ./libbaz/ 2>>EOE; + unpacked libbaz/1.1.0 + configured libbaz/1.1.0 + info: cfg/dir{libbaz-1.1.0/} is up to date + updated libbaz/1.1.0 + EOE + + $pkg_disfigure libbaz 2>'disfigured libbaz/1.1.0'; + $pkg_purge libbaz 2>'purged libbaz/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' + } } : prerequisite diff --git a/tests/pkg-system.test b/tests/pkg-system.test index 18d4347..e89ed33 100644 --- a/tests/pkg-system.test +++ b/tests/pkg-system.test @@ -663,8 +663,12 @@ rep_fetch += -d cfg --auth all --trust-yes 2>! # Still fail to build foo and sys:libbar/1. # $pkg_build foo 'sys:libbar/1' 2>>EOE != 0; - error: prerequisite libbar >= 2 of package foo is not available in source - info: sys:libbar/1 does not satisfy the constrains + error: unable to satisfy constraints on package libbar + info: foo depends on (libbar >= 2) + info: command line depends on (libbar == 1) + info: available sys:libbar/2 + info: available sys:libbar/1 + info: explicitly specify libbar version to manually satisfy both constraints info: while satisfying foo/2 EOE |