diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-03-09 14:02:32 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-03-09 14:58:10 +0300 |
commit | 61adcbd5ca83762c02cfa421e09fbd65c52b6da9 (patch) | |
tree | 4eaf5089ad37104a53ca74464c26b597ed2414bc /bpkg/pkg-unpack.cxx | |
parent | 538711543c68be94b3e7e3192394bc2f19f49516 (diff) |
Fix up package manifest version for pkg-unpack
Diffstat (limited to 'bpkg/pkg-unpack.cxx')
-rw-r--r-- | bpkg/pkg-unpack.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 9bd3e03..7472194 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -127,7 +127,8 @@ namespace bpkg } shared_ptr<selected_package> - pkg_unpack (const dir_path& c, + pkg_unpack (const common_options& o, + const dir_path& c, transaction& t, const dir_path& d, bool replace, @@ -147,6 +148,13 @@ namespace bpkg // pkg_unpack_check (c, t, m.name, replace); + // Fix-up the package version. + // + optional<version> v (package_version (o, d)); + + if (v) + m.version = move (*v); + // Use the special root repository as the repository of this // package. // @@ -411,7 +419,7 @@ namespace bpkg info << "run 'bpkg help pkg-unpack' for more information"; p = pkg_unpack ( - c, t, dir_path (args.next ()), o.replace (), o.purge ()); + o, c, t, dir_path (args.next ()), o.replace (), o.purge ()); } else { |