From f82ed52a4959cecae176600180f967328d924ce6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Oct 2015 10:12:14 +0200 Subject: Rename package to selected_package, state to package_state --- bpkg/pkg-unpack.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bpkg/pkg-unpack.cxx') diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 32d2af3..a7c53b6 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -22,7 +22,7 @@ using namespace butl; namespace bpkg { - static shared_ptr + static shared_ptr pkg_unpack (database& db, const dir_path& c, const dir_path& d, bool purge) { tracer trace ("pkg_unpack(dir)"); @@ -42,7 +42,7 @@ namespace bpkg // See if this package already exists in this configuration. // - if (shared_ptr p = db.find (n)) + if (shared_ptr p = db.find (n)) fail << "package " << n << " already exists in configuration " << c << info << "version: " << p->version << ", state: " << p->state; @@ -60,10 +60,10 @@ namespace bpkg // Add the package to the configuration. Use the special root // repository as the repository of this package. // - shared_ptr p (new package { + shared_ptr p (new selected_package { move (m.name), move (m.version), - state::unpacked, + package_state::unpacked, repository_location (), nullopt, // No archive false, // Don't purge archive. @@ -79,7 +79,7 @@ namespace bpkg return p; } - static shared_ptr + static shared_ptr pkg_unpack (const common_options& co, database& db, const dir_path& c, @@ -89,12 +89,12 @@ namespace bpkg tracer_guard tg (db, trace); transaction t (db.begin ()); - shared_ptr p (db.find (name)); + shared_ptr p (db.find (name)); if (p == nullptr) fail << "package " << name << " does not exist in configuration " << c; - if (p->state != state::fetched) + if (p->state != package_state::fetched) fail << "package " << name << " is " << p->state << info << "expected it to be fetched"; @@ -169,7 +169,7 @@ namespace bpkg p->src_root = d.leaf (); // For now assuming to be in configuration. p->purge_src = true; - p->state = state::unpacked; + p->state = package_state::unpacked; db.update (p); t.commit (); @@ -189,7 +189,7 @@ namespace bpkg database db (open (c, trace)); - shared_ptr p; + shared_ptr p; if (o.existing ()) { -- cgit v1.1