diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-03-14 14:34:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-03-14 14:34:12 +0200 |
commit | 7acf8ce6111e3740decd39b92c3383fcbdd00e21 (patch) | |
tree | 2c9c6d75bbac9b3b8a4dc9e7b46df01ba0ca3bf2 /bdep/sync.cxx | |
parent | c8f2a2c0776aee57af6af10d4a0128befbc1fdeb (diff) |
Implement fetch command
Diffstat (limited to 'bdep/sync.cxx')
-rw-r--r-- | bdep/sync.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/bdep/sync.cxx b/bdep/sync.cxx index e84fa0f..257cd20 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -18,6 +18,24 @@ namespace bdep { assert (!c->packages.empty ()); + // Do a separate fetch instead of letting pkg-build do it. This way we get + // better control of the diagnostics (no "fetching ..." for the project + // itself). We also make sure that if the user specifies a repository for + // a dependency to upgrade, then that repository is listed as part of the + // project prerequisites/complements. Or, in other words, we only want to + // allow specifying the location as a proxy for specifying version (i.e., + // "I want this dependency upgraded to the latest version available from + // this repository"). + // + // We also use the repository name rather than then location as a sanity + // check (the repository must have been added as part of init). + // + run_bpkg (co, + "fetch", + "-d", c->path, + "--shallow", + "dir:" + prj.string ()); + // Prepare the pkg-spec. // string spec; @@ -35,9 +53,9 @@ namespace bdep run_bpkg (co, "build", "-d", c->path, - //"--fetch-shallow", + "--no-fetch", "--configure-only", - //"--keep-out", + "--keep-out", spec); } |