aboutsummaryrefslogtreecommitdiff
path: root/bpkg/fetch-pkg.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-05 16:49:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-05 17:25:16 +0300
commit22e35bf80cea95dc1edce22e729199f61a6fedcd (patch)
treee8b00be480a8a1b57641f23e1f7d09fb0a8bad1a /bpkg/fetch-pkg.cxx
parentcdbc374bc16ed0db1a4a206064bb090ac935d89d (diff)
Add .manifest extension to repositories, packages and signature files
Diffstat (limited to 'bpkg/fetch-pkg.cxx')
-rw-r--r--bpkg/fetch-pkg.cxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/bpkg/fetch-pkg.cxx b/bpkg/fetch-pkg.cxx
index 09422e7..aba95ab 100644
--- a/bpkg/fetch-pkg.cxx
+++ b/bpkg/fetch-pkg.cxx
@@ -11,6 +11,7 @@
#include <bpkg/checksum.hxx>
#include <bpkg/diagnostics.hxx>
+#include <bpkg/manifest-utility.hxx>
using namespace std;
using namespace butl;
@@ -164,13 +165,11 @@ namespace bpkg
}
}
- static const path repositories ("repositories");
-
pkg_repository_manifests
pkg_fetch_repositories (const dir_path& d, bool iu)
{
return fetch_manifest<pkg_repository_manifests> (
- nullptr, d / repositories, iu).first;
+ nullptr, d / repositories_file, iu).first;
}
pair<pkg_repository_manifests, string/*checksum*/>
@@ -183,20 +182,18 @@ namespace bpkg
repository_url u (rl.url ());
path& f (*u.path);
- f /= repositories;
+ f /= repositories_file;
return rl.remote ()
? fetch_manifest<pkg_repository_manifests> (o, u, iu)
: fetch_manifest<pkg_repository_manifests> (&o, f, iu);
}
- static const path packages ("packages");
-
pkg_package_manifests
pkg_fetch_packages (const dir_path& d, bool iu)
{
return fetch_manifest<pkg_package_manifests> (
- nullptr, d / packages, iu).first;
+ nullptr, d / packages_file, iu).first;
}
pair<pkg_package_manifests, string/*checksum*/>
@@ -209,15 +206,13 @@ namespace bpkg
repository_url u (rl.url ());
path& f (*u.path);
- f /= packages;
+ f /= packages_file;
return rl.remote ()
? fetch_manifest<pkg_package_manifests> (o, u, iu)
: fetch_manifest<pkg_package_manifests> (&o, f, iu);
}
- static const path signature ("signature");
-
signature_manifest
pkg_fetch_signature (const common_options& o,
const repository_location& rl,
@@ -228,7 +223,7 @@ namespace bpkg
repository_url u (rl.url ());
path& f (*u.path);
- f /= signature;
+ f /= signature_file;
return rl.remote ()
? fetch_manifest<signature_manifest> (o, u, iu).first