diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-29 16:12:21 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-01-30 15:54:59 +0300 |
commit | fad62fd770129d79e370fc95323543581473cad8 (patch) | |
tree | c12dc09c0bfead4ed606c4c23702426c2737d41b /bpkg/pkg-unpack.cxx | |
parent | d5e755ebe85271e65d69afb38d6548d33e55e79e (diff) |
Fix package dependency constraint completions that could end up with latest snapshot
Diffstat (limited to 'bpkg/pkg-unpack.cxx')
-rw-r--r-- | bpkg/pkg-unpack.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 9d041e5..483a252 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -171,7 +171,15 @@ namespace bpkg // Verify the directory is a package and get its manifest. // - package_manifest m (pkg_verify (d, true /* ignore_unknown */)); + package_manifest m ( + pkg_verify (d, + true /* ignore_unknown */, + [&o, &d] (version& v) + { + if (optional<version> pv = package_version (o, d)) + v = move (*pv); + })); + l4 ([&]{trace << d << ": " << m.name << " " << m.version;}); // Check/diagnose an already existing package. @@ -180,9 +188,6 @@ namespace bpkg // Fix-up the package version. // - if (optional<version> v = package_version (o, d)) - m.version = move (*v); - if (optional<version> v = package_iteration ( o, c, t, d, m.name, m.version, true /* check_external */)) m.version = move (*v); |