aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbrep/build.hxx4
-rw-r--r--libbrep/build.xml2
-rw-r--r--tests/load/1/math/libexp-+1-1.2+1.tar.gzbin350 -> 0 bytes
-rw-r--r--tests/load/1/math/libexp-+2-1.2+1.tar.gzbin0 -> 351 bytes
-rw-r--r--tests/load/1/math/libfoo-+0-X.Y.tar.gzbin0 -> 222 bytes
-rw-r--r--tests/load/1/math/packages.manifest13
-rw-r--r--tests/load/1/stable/libfoo-1.2.2.tar.gzbin301 -> 301 bytes
-rw-r--r--tests/load/1/stable/packages.manifest4
-rw-r--r--tests/load/1/stable/signature.manifest20
-rw-r--r--tests/load/driver.cxx44
10 files changed, 63 insertions, 24 deletions
diff --git a/libbrep/build.hxx b/libbrep/build.hxx
index ba5851d..c72269c 100644
--- a/libbrep/build.hxx
+++ b/libbrep/build.hxx
@@ -24,9 +24,9 @@
// Used by the data migration entries.
//
-#define LIBBREP_BUILD_SCHEMA_VERSION_BASE 3
+#define LIBBREP_BUILD_SCHEMA_VERSION_BASE 4
-#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 3, closed)
+#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 4, open)
// We have to keep these mappings at the global scope instead of inside
// the brep namespace because they need to be also effective in the
diff --git a/libbrep/build.xml b/libbrep/build.xml
index 04ffd78..0fd4154 100644
--- a/libbrep/build.xml
+++ b/libbrep/build.xml
@@ -1,5 +1,5 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="build" version="1">
- <model version="3">
+ <model version="4">
<table name="build" kind="object">
<column name="package_name" type="CITEXT" null="false"/>
<column name="package_version_epoch" type="INTEGER" null="false"/>
diff --git a/tests/load/1/math/libexp-+1-1.2+1.tar.gz b/tests/load/1/math/libexp-+1-1.2+1.tar.gz
deleted file mode 100644
index 2cd4bd7..0000000
--- a/tests/load/1/math/libexp-+1-1.2+1.tar.gz
+++ /dev/null
Binary files differ
diff --git a/tests/load/1/math/libexp-+2-1.2+1.tar.gz b/tests/load/1/math/libexp-+2-1.2+1.tar.gz
new file mode 100644
index 0000000..084de3f
--- /dev/null
+++ b/tests/load/1/math/libexp-+2-1.2+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/libfoo-+0-X.Y.tar.gz b/tests/load/1/math/libfoo-+0-X.Y.tar.gz
new file mode 100644
index 0000000..6867d4f
--- /dev/null
+++ b/tests/load/1/math/libfoo-+0-X.Y.tar.gz
Binary files differ
diff --git a/tests/load/1/math/packages.manifest b/tests/load/1/math/packages.manifest
index 50db2dc..9b39555 100644
--- a/tests/load/1/math/packages.manifest
+++ b/tests/load/1/math/packages.manifest
@@ -2,7 +2,7 @@
sha256sum: b85ba3a0ba45b98e1fbb2507f199bc4b218a4a413ec6ba4094e214a7507490a2
:
name: libexp
-version: +1-1.2+1
+version: +2-1.2+1
summary: The exponent
license: MIT
tags: c++, exponent
@@ -14,8 +14,15 @@ depends: libmisc
depends: libpq >= 9.0.0
build-exclude: *; Only supported on Linux.
build-include: linux*
-location: libexp-+1-1.2+1.tar.gz
-sha256sum: 58c1385e959a5e650229768f907442cf9569cb23acc3b3f1b5478060f7bfe5f4
+location: libexp-+2-1.2+1.tar.gz
+sha256sum: 040b3817418121e8e922ac3a6d3752378f78239faad7d257de87019557fdd245
+:
+name: libfoo
+version: +0-X.Y
+summary: The Foo Library
+license: MIT
+location: libfoo-+0-X.Y.tar.gz
+sha256sum: c994fd49f051ab7fb25f3a4e68ca878e484c5d3c2cb132b37d41224b0621b618
:
name: libfoo
version: 1.0
diff --git a/tests/load/1/stable/libfoo-1.2.2.tar.gz b/tests/load/1/stable/libfoo-1.2.2.tar.gz
index 619c813..94aca23 100644
--- a/tests/load/1/stable/libfoo-1.2.2.tar.gz
+++ b/tests/load/1/stable/libfoo-1.2.2.tar.gz
Binary files differ
diff --git a/tests/load/1/stable/packages.manifest b/tests/load/1/stable/packages.manifest
index af3bc32..0161a46 100644
--- a/tests/load/1/stable/packages.manifest
+++ b/tests/load/1/stable/packages.manifest
@@ -29,9 +29,9 @@ tags: c++, foo
url: http://www.example.com/foo/
email: foo-users@example.com
depends: libbar <= 2.4.0
-depends: libexp == +1-1.2
+depends: libexp == +2-1.2
location: libfoo-1.2.2.tar.gz
-sha256sum: 58139f97dd8a9820a8c0f068f963865fdc0d1e5f7636d464c0d07441095a35fc
+sha256sum: 088068ea3d69542a153f829cf836013374763148fba0a43d8047974f58b5efd7
:
name: libfoo
version: 1.2.3+4
diff --git a/tests/load/1/stable/signature.manifest b/tests/load/1/stable/signature.manifest
index b0fd9a8..34fc749 100644
--- a/tests/load/1/stable/signature.manifest
+++ b/tests/load/1/stable/signature.manifest
@@ -1,13 +1,13 @@
: 1
-sha256sum: 6eaeabb5824a3174435c9dbfdd8eba8a6b3e29133dcd2963f69745a4bb704ed2
+sha256sum: ce908ea7ed5fb96a8ad246bd492956013589fcf9d82319b8cc0d572453e16fe5
signature: \
-bA1yuTMl1f5jtqttXynHoFzNj3qzGftTSyphz2FGNIqVCaOc2NOYDQiKwmmC/atYiRr+mJ1DoTa5
-GHt7esk0sW2ozx8qRazZRmdh+kXveyRhBsGqtOFtpM7au+MOq/X9HaBz3xxc2sd21tw7nwbWSevS
-mBtpZyvFNW3xO/ecj5XgfzoyrEiXxw1Uf7SGOso4gErddTZVZeV2XqGrEn4pulOEv1w595yvQ3R5
-9eiPj5eYr7ofFaXCHybIi2LQJOifieqQgkwKrMdck18B8XBp/GR3+uP9paHWQKVoRZGusKaNl12F
-TaJkerP+I/WFiu/It0N/6foz57f7OyYAIL086/g7MXb1UwK0MhqkytuoJY2sy8PUUyD4HuNFkSYn
-Xm25OqYALoX8e4Gzbr9VkpR+r6O3EO7FmyCPl/ivhjxyrl+Npj9qARwBstu+i3C0jtxRe3V5jVNV
-D0q7w5MzU9GhZQpN3lW1nVn68dshLtNo5KYFHZtvLnL11Cis3ax0BE1cEPs37rStmJhQDBUnCC1z
-oDPBZRi7EPHEkCyhq1/JBQT3kzbl7Ns24HZZJSUEDSya/vjTxyyoYT7Xry45sYiHCCIZ9mHSArLS
-CFJa+27UdqPhIPt9um1sRLCW15djib3lvqqcfAykWyS3ELAduP3vV3CGxyCuSm6He91Y9S9OoIE=
+RO0heyLVCNV6BWU/wTEYx/L8IS0vNJDHYgcgJmdV8bPygkMrdH3V/YMzWBcHwfyvTKoBIIMHheQK
+2/rQtB51UHQKp+TENpHqdvxV2lUb8nmGmYVo00eLh1L6u50sUYrXfP8RIHD7n2OfBglYc2mKuyXp
+FJU1B04SUnrcmceax5VtwKVd1Iote9ZxgKekgMzIgDZl80DeIBZfcmKmvE/QOWP8E6DKVxurkFyC
+LkWTdavOfaCTb9F+zdzMzFgcrS9fRXIPPFjsVPkx/EeJV8//NRj8mBUqs/avyX2LqE6hk5TvKYyS
+0hnfiWhA0lh/XD9J5irhHKPjpPnuLAjtwhOi2n/113A5EtBTfct3rQSL8/rEejSgC1HILpjwMZ7K
+91xtTB9zbrYchX7BEh++r9fcHH3vF5rc6nOaJhwjZzH50OftMQVYifYRXP19R1H7usAuXwoXoM2a
+Z3BMNP9npzSbQmu6xCLImg2Vqr+GHl9iPgzB8jfmnn5L48I0LeAXeiNANeZGAA7hcD3UehNvaT4q
+58fw5hyKY/CWDa5LeGLmuiEsy8UaPdppZjy6ROVwiRsC0uAZZU/rbg57tJkXMtE/ZgNKCJF0pCVu
+badHFxqy4JIUP1hZfKlm43Lb5HGb15HENBTxBom0QAU0Q3IiUGG6RUQOrxYddDO2WG0Xwv9Ddng=
\
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index c86258b..f6a4268 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -142,7 +142,7 @@ main (int argc, char* argv[])
transaction t (db.begin ());
assert (db.query<repository> ().size () == 7);
- assert (db.query<package> ().size () == 17);
+ assert (db.query<package> ().size () == 18);
shared_ptr<repository> sr (
db.load<repository> ("pkg:dev.cppget.org/stable"));
@@ -190,6 +190,38 @@ main (int argc, char* argv[])
// Verify libfoo package versions.
//
+ // libfoo-+0-X.Y
+ //
+ shared_ptr<package> fpvxy (
+ db.load<package> (
+ package_id (package_name ("libfoo"), version ("+0-X.Y"))));
+
+ assert (fpvxy->summary == "The Foo Library");
+ assert (fpvxy->tags.empty ());
+ assert (!fpvxy->description);
+ assert (!fpvxy->url);
+ assert (!fpvxy->package_url);
+ assert (!fpvxy->email);
+ assert (!fpvxy->package_email);
+
+ assert (fpvxy->internal_repository.load () == mr);
+ assert (fpvxy->other_repositories.empty ());
+
+ assert (fpvxy->priority == priority::low);
+ assert (fpvxy->changes.empty ());
+
+ assert (fpvxy->license_alternatives.size () == 1);
+ assert (fpvxy->license_alternatives[0].size () == 1);
+ assert (fpvxy->license_alternatives[0][0] == "MIT");
+
+ assert (fpvxy->dependencies.empty ());
+ assert (fpvxy->requirements.empty ());
+
+ assert (check_location (fpvxy));
+
+ assert (fpvxy->sha256sum && *fpvxy->sha256sum ==
+ "c994fd49f051ab7fb25f3a4e68ca878e484c5d3c2cb132b37d41224b0621b618");
+
// libfoo-1.0
//
shared_ptr<package> fpv1 (
@@ -270,12 +302,12 @@ main (int argc, char* argv[])
"libexp",
optional<dependency_constraint> (
dependency_constraint (
- version ("+1-1.2"), false, version ("+1-1.2"), false))));
+ version ("+2-1.2"), false, version ("+2-1.2"), false))));
assert (check_location (fpv2));
assert (fpv2->sha256sum && *fpv2->sha256sum ==
- "58139f97dd8a9820a8c0f068f963865fdc0d1e5f7636d464c0d07441095a35fc");
+ "088068ea3d69542a153f829cf836013374763148fba0a43d8047974f58b5efd7");
// libfoo-1.2.2-alpha.1
//
@@ -624,11 +656,11 @@ main (int argc, char* argv[])
// Verify libexp package version.
//
- // libexp-1+1.2
+ // libexp-+2-1.2
//
shared_ptr<package> epv (
db.load<package> (
- package_id (package_name ("libexp"), version ("+1-1.2+1"))));
+ package_id (package_name ("libexp"), version ("+2-1.2+1"))));
assert (epv->summary == "The exponent");
assert (epv->tags == strings ({"c++", "exponent"}));
@@ -672,7 +704,7 @@ main (int argc, char* argv[])
assert (check_location (epv));
assert (epv->sha256sum && *epv->sha256sum ==
- "58c1385e959a5e650229768f907442cf9569cb23acc3b3f1b5478060f7bfe5f4");
+ "040b3817418121e8e922ac3a6d3752378f78239faad7d257de87019557fdd245");
// Verify libpq package version.
//