diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-01-17 17:35:27 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-01-18 18:47:34 +0300 |
commit | 110b8541dca943a5513ce2ad4e1e8863806aa56f (patch) | |
tree | 57b7acbfa280a526e12f09c45bbb8675d501b877 /bpkg/system-repository.cxx | |
parent | d1f58962fa9953a9ed0d2c72be5d86f3d6605804 (diff) |
Add support for multiple system package versionssys-install-multiple-versions
Diffstat (limited to 'bpkg/system-repository.cxx')
-rw-r--r-- | bpkg/system-repository.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bpkg/system-repository.cxx b/bpkg/system-repository.cxx index d7a47b7..229ebd3 100644 --- a/bpkg/system-repository.cxx +++ b/bpkg/system-repository.cxx @@ -5,10 +5,14 @@ namespace bpkg { - const version& system_repository:: - insert (const package_name& name, const version& v, bool authoritative) + const system_package_versions& system_repository:: + insert (const package_name& name, + const system_package_versions& vs, + bool authoritative) { - auto p (map_.emplace (name, system_package {v, authoritative})); + assert (!vs.empty ()); + + auto p (map_.emplace (name, system_package {vs, authoritative})); if (!p.second) { @@ -21,10 +25,10 @@ namespace bpkg if (authoritative >= sp.authoritative) { sp.authoritative = authoritative; - sp.version = v; + sp.versions = vs; } } - return p.first->second.version; + return p.first->second.versions; } } |