diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-24 14:46:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-30 12:32:32 +0200 |
commit | 67a0e8d70f0caf8b85e0cf2031333236b2a3dcdf (patch) | |
tree | 3a7d71cd1553338cccb19190dc47bfceafd52499 /bpkg/rep-info.cxx | |
parent | cf86194e91d55464f9c137258e4157415d196697 (diff) |
Add checksum verification
Diffstat (limited to 'bpkg/rep-info.cxx')
-rw-r--r-- | bpkg/rep-info.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bpkg/rep-info.cxx b/bpkg/rep-info.cxx index 2205a5b..241f04b 100644 --- a/bpkg/rep-info.cxx +++ b/bpkg/rep-info.cxx @@ -35,9 +35,21 @@ namespace bpkg // Fetch everything we will need before printing anything. Ignore // unknown manifest entries unless we are dumping them. // - repository_manifests rms (fetch_repositories (o, rl, !o.manifest ())); package_manifests pms (fetch_packages (o, rl, !o.manifest ())); + repository_manifests rms; + + try + { + rms = fetch_repositories (o, rl, pms.sha256sum, !o.manifest ()); + } + catch (const checksum_mismatch&) + { + fail << "repository files checksum mismatch for " + << rl.canonical_name () << + info << "try again"; + } + // Now print. // bool all (!o.name () && !o.repositories () && !o.packages ()); |