aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-01-27 10:49:35 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-01-27 12:00:06 +0300
commitbf4b660253e62d50a0d635abee05fb1faebc743e (patch)
treec6b863fbd5a7797dff88a3f62ab3f5543b86bda3
parent33f5e4665f961de406802f13420c66598c7b32e1 (diff)
Allow multiple <distribution>-name values
-rw-r--r--libbpkg/manifest.cxx2
-rw-r--r--tests/manifest/testscript24
2 files changed, 12 insertions, 14 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx
index 637d0ae..162de5a 100644
--- a/libbpkg/manifest.cxx
+++ b/libbpkg/manifest.cxx
@@ -4061,7 +4061,7 @@ namespace bpkg
{
add_distribution (
parse_distribution (move (n), n.size () - 5, move (v)),
- true /* unique */);
+ false /* unique */);
}
// Note: must precede the check for the "-version" suffix.
//
diff --git a/tests/manifest/testscript b/tests/manifest/testscript
index e292141..f4a5282 100644
--- a/tests/manifest/testscript
+++ b/tests/manifest/testscript
@@ -655,23 +655,22 @@
EOO
}
- : dash-in-name
+ : multiple-names
:
{
- $* <<EOI 2>>EOE != 0
+ $* <<EOO >>EOO
: 1
name: libcrypto
version: 1.1.1+18
upstream-version: 1.1.1n
summary: C library providing general cryptography and X.509 support
license: OpenSSL
- de-bian-name: libssl1.1 libssl-dev
- EOI
- stdin:7:1: error: distribution name 'de-bian' contains '-'
- EOE
+ debian-name: libcurl4 libcurl4-doc libcurl4-openssl-dev
+ debian-name: libcurl3-gnutls libcurl4-gnutls-dev
+ EOO
}
- : empty-value
+ : dash-in-name
:
{
$* <<EOI 2>>EOE != 0
@@ -681,13 +680,13 @@
upstream-version: 1.1.1n
summary: C library providing general cryptography and X.509 support
license: OpenSSL
- debian-name:
+ de-bian-name: libssl1.1 libssl-dev
EOI
- stdin:7:13: error: empty package distribution value
+ stdin:7:1: error: distribution name 'de-bian' contains '-'
EOE
}
- : redefinition
+ : empty-value
:
{
$* <<EOI 2>>EOE != 0
@@ -697,10 +696,9 @@
upstream-version: 1.1.1n
summary: C library providing general cryptography and X.509 support
license: OpenSSL
- debian-name: libssl1.1 libssl-dev
- debian-name: libssl1.1 libssl-dev
+ debian-name:
EOI
- stdin:8:1: error: package distribution value redefinition
+ stdin:7:13: error: empty package distribution value
EOE
}
}