aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-checkout.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-14 00:54:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-16 13:45:18 +0300
commitbc24eec7208187e171fd61ced7130fd8e2828257 (patch)
tree23e9076f0e06282001758ef5939db872eba214ff /bpkg/pkg-checkout.cxx
parent5f75406495f06b75eb10b3456a1ca550f4e55b61 (diff)
Add support for version iteration
Diffstat (limited to 'bpkg/pkg-checkout.cxx')
-rw-r--r--bpkg/pkg-checkout.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx
index 14f84cb..6e4a7a5 100644
--- a/bpkg/pkg-checkout.cxx
+++ b/bpkg/pkg-checkout.cxx
@@ -9,6 +9,7 @@
#include <bpkg/package.hxx>
#include <bpkg/package-odb.hxx>
#include <bpkg/database.hxx>
+#include <bpkg/checksum.hxx>
#include <bpkg/diagnostics.hxx>
#include <bpkg/manifest-utility.hxx>
@@ -162,6 +163,8 @@ namespace bpkg
false /* quiet */,
strings ({"config.dist.root=" + c.representation ()}));
+ string mc (sha256 (o, d / manifest_file));
+
if (p != nullptr)
{
// Clean up the source directory and archive of the package we are
@@ -175,6 +178,7 @@ namespace bpkg
p->repository = rl;
p->src_root = d.leaf ();
p->purge_src = true;
+ p->manifest_checksum = move (mc);
db.update (p);
}
@@ -194,6 +198,7 @@ namespace bpkg
false,
d.leaf (), // Source root.
true, // Purge directory.
+ move (mc),
nullopt, // No output directory yet.
{}}); // No prerequisites captured yet.