From 61adcbd5ca83762c02cfa421e09fbd65c52b6da9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 9 Mar 2018 14:02:32 +0300 Subject: Fix up package manifest version for pkg-unpack --- bpkg/pkg-unpack.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bpkg/pkg-unpack.cxx') 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 - 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 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 { -- cgit v1.1