diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-02-22 11:19:29 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-02-22 12:33:48 +0300 |
commit | 8fad6bef99ec3519fc0f87038f9dbb331c1230df (patch) | |
tree | 694fab93c7356a5eeecac00cf8b1be2f6b0024f3 | |
parent | b3ca587b6c7c6f3f3c2bfa63629878c090f4a5a2 (diff) |
Rename repository state to fragment
-rw-r--r-- | bpkg/package.hxx | 11 | ||||
-rw-r--r-- | bpkg/package.xml | 2 | ||||
-rw-r--r-- | bpkg/pkg-build.cxx | 9 | ||||
-rw-r--r-- | bpkg/pkg-checkout.cxx | 2 | ||||
-rw-r--r-- | bpkg/rep-fetch.cxx | 2 | ||||
-rw-r--r-- | 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_type> 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 @@ <column name="version_canonical_release" type="TEXT" null="true" options="COLLATE BINARY"/> <column name="version_revision" type="INTEGER" null="true"/> <column name="repository" type="TEXT" null="true"/> - <column name="state" type="TEXT" null="true"/> + <column name="fragment" type="TEXT" null="true"/> <column name="location" type="TEXT" null="true"/> <foreign-key name="object_id_fk" on-delete="CASCADE"> <column name="name"/> 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<available_package> (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<dir_path> (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<repository> (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<repository> repositories; |