aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/mod-package-details.cxx6
-rw-r--r--mod/mod-package-version-details.cxx7
-rw-r--r--tests/load/1/math/libfoo-1.2.4+1.tar.gzbin933 -> 941 bytes
-rw-r--r--tests/load/1/math/packages10
-rw-r--r--tests/load/driver.cxx14
5 files changed, 22 insertions, 15 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx
index 605022d..dce7f3b 100644
--- a/mod/mod-package-details.cxx
+++ b/mod/mod-package-details.cxx
@@ -179,8 +179,7 @@ handle (request& rq, response& rs)
s << TABLE(CLASS="proplist", ID="package")
<< TBODY
<< TR_LICENSE (licenses)
- << TR_URL (pkg->url)
- << TR_EMAIL (pkg->email);
+ << TR_URL (pkg->url);
if (pkg->doc_url)
s << TR_URL (*pkg->doc_url, "doc-url");
@@ -188,7 +187,8 @@ handle (request& rq, response& rs)
if (pkg->src_url)
s << TR_URL (*pkg->src_url, "src-url");
- s << TR_TAGS (pkg->tags, root)
+ s << TR_EMAIL (pkg->email)
+ << TR_TAGS (pkg->tags, root)
<< ~TBODY
<< ~TABLE;
}
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx
index 1186470..6007a80 100644
--- a/mod/mod-package-version-details.cxx
+++ b/mod/mod-package-version-details.cxx
@@ -171,7 +171,6 @@ handle (request& rq, response& rs)
assert (pkg->location && pkg->sha256sum);
- const email& em (pkg->email);
const repository_location& rl (pkg->internal_repository.load ()->location);
s << TABLE(CLASS="proplist", ID="version")
@@ -192,8 +191,7 @@ handle (request& rq, response& rs)
<< TABLE(CLASS="proplist", ID="package")
<< TBODY
- << TR_URL (pkg->url)
- << TR_EMAIL (em);
+ << TR_URL (pkg->url);
if (pkg->doc_url)
s << TR_URL (*pkg->doc_url, "doc-url");
@@ -205,6 +203,9 @@ handle (request& rq, response& rs)
if (pu && *pu != pkg->url)
s << TR_URL (*pu, "package-url");
+ const email& em (pkg->email);
+ s << TR_EMAIL (em);
+
const auto& pe (pkg->package_email);
if (pe && *pe != em)
s << TR_EMAIL (*pe, "package-email");
diff --git a/tests/load/1/math/libfoo-1.2.4+1.tar.gz b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
index 20434bf..7c6875b 100644
--- a/tests/load/1/math/libfoo-1.2.4+1.tar.gz
+++ b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/packages b/tests/load/1/math/packages
index c49b7bd..b538d9e 100644
--- a/tests/load/1/math/packages
+++ b/tests/load/1/math/packages
@@ -51,10 +51,10 @@ changes: \
* test suite extended significantly
\
url: http://www.example.com/foo/; Project home page.
-email: foo-users@example.com; Public mailing list. Read FAQ before posting.
-doc-url: http://www.example.org/projects/libfoo/man.xhtml; documentation page
-src-url: https://git.example.org/cgit/libfoo/tree/; source tree url
+doc-url: http://www.example.org/projects/libfoo/man.xhtml; Documentation page.
+src-url: http://scm.example.com/?p=odb/libodb.git\;a=tree; Source tree url.
package-url: http://www.example.com/foo/pack; Package details.
+email: foo-users@example.com; Public mailing list. Read FAQ before posting.
package-email: pack@example.com; Current packager.
depends: libmisc < 1.1 | libmisc > 2.3.0; Crashes with 1.1.0-2.3.0.
depends: libexp >= 1.0
@@ -64,7 +64,7 @@ requires: c++11
requires: ? ; libc++ standard library if using Clang on Mac OS X.
requires: ? vc++ >= 12.0; Only if using VC++ on Windows.
location: libfoo-1.2.4+1.tar.gz
-sha256sum: 2d912d510b42b1fa04028b0c6a31158ec14b225431b9c2ac0c953d46a7304225
+sha256sum: c5e593d8efdc34a258f8c0b8cc352dc7193ea4a1d666bcf8d48708c7dd82d0d6
:
name: libpq
version: 0
@@ -94,8 +94,8 @@ https://git.build2.org/cgit/packaging/postgresql/
\
url: https://www.postgresql.org/
-email: pgsql-general@postgresql.org; Mailing list.
package-url: https://git.build2.org/cgit/packaging/postgresql/
+email: pgsql-general@postgresql.org; Mailing list.
package-email: packaging@build2.org; Mailing list.
requires: build2 >= 0.4.0
location: libpq-0.tar.gz
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index 79a7989..d1283f3 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -510,11 +510,17 @@ main (int argc, char* argv[])
"total with an extensive test suite. The API is\nsimilar to "
"MATLAB.\n\nUseful for conversion of research code into "
"production environments.");
+
assert (fpv5->url == "http://www.example.com/foo/");
+
assert (fpv5->doc_url && *fpv5->doc_url ==
- "http://www.example.org/projects/libfoo/man.xhtml");
- assert (fpv5->src_url &&
- *fpv5->src_url == "https://git.example.org/cgit/libfoo/tree/");
+ "http://www.example.org/projects/libfoo/man.xhtml" &&
+ fpv5->doc_url->comment == "Documentation page.");
+
+ assert (fpv5->src_url && *fpv5->src_url ==
+ "http://scm.example.com/?p=odb/libodb.git;a=tree" &&
+ fpv5->src_url->comment == "Source tree url.");
+
assert (fpv5->package_url &&
*fpv5->package_url == "http://www.example.com/foo/pack");
assert (fpv5->email == "foo-users@example.com");
@@ -606,7 +612,7 @@ main (int argc, char* argv[])
assert (check_location (fpv5));
assert (fpv5->sha256sum && *fpv5->sha256sum ==
- "2d912d510b42b1fa04028b0c6a31158ec14b225431b9c2ac0c953d46a7304225");
+ "c5e593d8efdc34a258f8c0b8cc352dc7193ea4a1d666bcf8d48708c7dd82d0d6");
// Verify libexp package version.
//