aboutsummaryrefslogtreecommitdiff
path: root/libbrep
diff options
context:
space:
mode:
Diffstat (limited to 'libbrep')
-rw-r--r--libbrep/package.cxx5
-rw-r--r--libbrep/package.hxx12
-rw-r--r--libbrep/package.xml6
3 files changed, 19 insertions, 4 deletions
diff --git a/libbrep/package.cxx b/libbrep/package.cxx
index a01ed14..763cec9 100644
--- a/libbrep/package.cxx
+++ b/libbrep/package.cxx
@@ -52,6 +52,7 @@ namespace brep
package::
package (package_name nm,
version_type vr,
+ optional<string> uv,
package_name pn,
priority_type pr,
string sm,
@@ -81,6 +82,7 @@ namespace brep
tenant (id.tenant),
name (id.name),
version (move (vr)),
+ upstream_version (move (uv)),
project (move (pn)),
priority (move (pr)),
summary (move (sm)),
@@ -144,6 +146,9 @@ namespace brep
string k (project.string () + " " + name.string () + " " +
version.string () + " " + version.string (true));
+ if (upstream_version)
+ k += " " + *upstream_version;
+
// Add tags to keywords.
//
for (const auto& t: tags)
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index 2e31ff4..f59c0d8 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -21,7 +21,7 @@
//
#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 11
-#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 12, closed)
+#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 13, closed)
namespace brep
{
@@ -344,6 +344,7 @@ namespace brep
public:
using repository_type = brep::repository;
using version_type = brep::version;
+ using upstream_version_type = brep::upstream_version;
using priority_type = brep::priority;
using license_alternatives_type = brep::license_alternatives;
using url_type = brep::url;
@@ -357,6 +358,7 @@ namespace brep
//
package (package_name,
version_type,
+ optional<string> upstream_version,
package_name project,
priority_type,
string summary,
@@ -399,9 +401,11 @@ namespace brep
//
package_id id;
- const string& tenant; // Tracks id.tenant.
- const package_name& name; // Tracks id.name.
- upstream_version version;
+ const string& tenant; // Tracks id.tenant.
+ const package_name& name; // Tracks id.name.
+ upstream_version_type version;
+
+ optional<string> upstream_version;
// Matches the package name if the project name is not specified in
// the manifest.
diff --git a/libbrep/package.xml b/libbrep/package.xml
index fdb4f04..a1e7602 100644
--- a/libbrep/package.xml
+++ b/libbrep/package.xml
@@ -1,4 +1,10 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="package" version="1">
+ <changeset version="13">
+ <alter-table name="package">
+ <add-column name="upstream_version" type="TEXT" null="true"/>
+ </alter-table>
+ </changeset>
+
<changeset version="12">
<alter-table name="package">
<add-column name="description_type" type="TEXT" null="true"/>