From 8fad6bef99ec3519fc0f87038f9dbb331c1230df Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Feb 2018 11:19:29 +0200 Subject: Rename repository state to fragment --- bpkg/package.hxx | 11 ++++++----- bpkg/package.xml | 2 +- bpkg/pkg-build.cxx | 9 +++++---- bpkg/pkg-checkout.cxx | 2 +- bpkg/rep-fetch.cxx | 2 +- bpkg/rep-fetch.hxx | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 41e8bd6..23fe9b2 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -293,14 +293,15 @@ namespace bpkg { using repository_type = bpkg::repository; - // State is the repository type-specific information that can be used - // to identify the repository state this package came from. For example, - // for a version control-based repository this could be a commit id. + // Fragment is optional, repository type-specific information that can be + // used to identify the repository fragment/partition/view/etc that this + // package came from. For example, for a version control-based repository + // this could be a commit id. // - // The localtion is the package location within this repository state. + // The location is the package location within this repository fragment. // lazy_shared_ptr repository; - string state; + string fragment; path location; }; diff --git a/bpkg/package.xml b/bpkg/package.xml index d411a7e..bc995be 100644 --- a/bpkg/package.xml +++ b/bpkg/package.xml @@ -70,7 +70,7 @@ - + diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index dbb336d..384cb91 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -1192,9 +1192,10 @@ namespace bpkg v = m.version; ar = root; ap = make_shared (move (m)); - ap->locations.push_back (package_location {root, - string () /* state */, - move (a)}); + ap->locations.push_back ( + package_location {root, + string () /* fragment */, + move (a)}); } } catch (const invalid_path&) @@ -1238,7 +1239,7 @@ namespace bpkg ar = root; ap->locations.push_back ( package_location {root, - string () /* state */, + string () /* fragment */, move (d)}); } } diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx index 83ab935..7377b8e 100644 --- a/bpkg/pkg-checkout.cxx +++ b/bpkg/pkg-checkout.cxx @@ -119,7 +119,7 @@ namespace bpkg dir_path sd (c / repos_dir); sd /= dir_path (sha256 (rl.canonical_name ()).abbreviated_string (16)); - sd /= dir_path (pl->state); + sd /= dir_path (pl->fragment); sd /= path_cast (pl->location); // Verify the package prerequisites are all configured since the dist diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx index 0458975..fc59ed9 100644 --- a/bpkg/rep-fetch.cxx +++ b/bpkg/rep-fetch.cxx @@ -593,7 +593,7 @@ namespace bpkg // p->locations.push_back ( package_location {lazy_shared_ptr (db, r), - move (fp.repository_state), + move (fp.repository_fragment), move (*pm.location)}); if (persist) diff --git a/bpkg/rep-fetch.hxx b/bpkg/rep-fetch.hxx index cfd5f81..0a7cacd 100644 --- a/bpkg/rep-fetch.hxx +++ b/bpkg/rep-fetch.hxx @@ -32,7 +32,7 @@ namespace bpkg struct package { package_manifest manifest; - string repository_state; // See package_location::state. + string repository_fragment; // See package_location::fragment. }; std::vector repositories; -- cgit v1.1