aboutsummaryrefslogtreecommitdiff
path: root/libbrep
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-12-22 21:52:01 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-01-17 19:22:38 +0300
commit4a5ca6f9853938eec8b5e487dc6cb3728dfb6a15 (patch)
tree29963bae3dddd53f8d17b10e0e77761f62a78d25 /libbrep
parent36115f92a7fdebaf13cb968b1acfe3c9973c0df4 (diff)
Adapt to package manifest dependency classes change
Diffstat (limited to 'libbrep')
-rw-r--r--libbrep/package.hxx25
-rw-r--r--libbrep/package.xml12
2 files changed, 32 insertions, 5 deletions
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index 46e5292..d0ac23f 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -20,7 +20,7 @@
//
#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 21
-#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 23, closed)
+#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 24, closed)
namespace brep
{
@@ -159,23 +159,38 @@ namespace brep
class dependency_alternative: public small_vector<dependency, 1>
{
public:
+ // While we currently don't use the reflect, prefer, accept, and require
+ // values, let's save them for completeness.
+ //
optional<string> enable;
+ optional<string> reflect;
+ optional<string> prefer;
+ optional<string> accept;
+ optional<string> require;
dependency_alternative () = default;
- dependency_alternative (optional<string> e): enable (move (e)) {}
+ dependency_alternative (optional<string> e,
+ butl::optional<std::string> r,
+ butl::optional<std::string> p,
+ butl::optional<std::string> a,
+ butl::optional<std::string> q)
+ : enable (std::move (e)),
+ reflect (std::move (r)),
+ prefer (std::move (p)),
+ accept (std::move (a)),
+ require (std::move (q)) {}
};
#pragma db value
class dependency_alternatives: public small_vector<dependency_alternative, 1>
{
public:
- bool conditional;
bool buildtime;
string comment;
dependency_alternatives () = default;
- dependency_alternatives (bool d, bool b, string c)
- : conditional (d), buildtime (b), comment (move (c)) {}
+ dependency_alternatives (bool b, string c)
+ : buildtime (b), comment (move (c)) {}
};
using dependencies = vector<dependency_alternatives>;
diff --git a/libbrep/package.xml b/libbrep/package.xml
index 72e9c83..ee177a8 100644
--- a/libbrep/package.xml
+++ b/libbrep/package.xml
@@ -1,4 +1,16 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="package" version="1">
+ <changeset version="24">
+ <alter-table name="package_dependencies">
+ <drop-column name="conditional"/>
+ </alter-table>
+ <alter-table name="package_dependency_alternatives">
+ <add-column name="reflect" type="TEXT" null="true"/>
+ <add-column name="prefer" type="TEXT" null="true"/>
+ <add-column name="accept" type="TEXT" null="true"/>
+ <add-column name="require" type="TEXT" null="true"/>
+ </alter-table>
+ </changeset>
+
<changeset version="23">
<alter-table name="package_requirements">
<drop-column name="conditional"/>