aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-21 21:10:09 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-24 17:39:13 +0300
commit3a6c4ab1b6fc79a6a543088553cdd6bc8cb0a1dd (patch)
tree1ca0c3b9ef763276ff45c20a62d2504833e5f67d /bpkg/package.cxx
parent1cab4fbd051ee5a71f073446ad5ad1b3d79f1031 (diff)
Adapt to inventing package_name type
Diffstat (limited to 'bpkg/package.cxx')
-rw-r--r--bpkg/package.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/bpkg/package.cxx b/bpkg/package.cxx
index 788935e..dea16f2 100644
--- a/bpkg/package.cxx
+++ b/bpkg/package.cxx
@@ -249,15 +249,17 @@ namespace bpkg
}
string
- package_string (const string& n, const version& v, bool system)
+ package_string (const package_name& n, const version& v, bool system)
{
+ assert (!n.empty ());
+
string vs (v.empty ()
? string ()
: v == wildcard_version
? "/*"
: '/' + v.string ());
- return system ? "sys:" + n + vs : n + vs;
+ return system ? "sys:" + n.string () + vs : n.string () + vs;
}
// selected_package
@@ -273,7 +275,7 @@ namespace bpkg
const dir_path& c,
transaction& t,
const dir_path& d,
- const string& n,
+ const package_name& n,
const version& v,
bool check_external)
{