From 98e563bd3e9fa128b8fed4ebd9daf7185b2222f2 Mon Sep 17 00:00:00 2001 From: Gabor Lekeny Date: Tue, 11 Nov 2014 13:20:38 +0100 Subject: [PATCH] Package multiple layout using matrix parameters * To support package upload to mulitple distributions and/or architecture the encode_matrix_parameters should be modified to handle URL layout specified in Artifactory documentation "For example, to upload package libatk1.0_i386.deb to both wheezy and trusty distributions, in both main and contrib components and both i386 and 64bit-arm architectures you would specify the following Target Path to upload using the UI: pool/libatk1.0_i386.deb;deb.distribution=wheezy; deb.distribution=trusty;deb.component=main;deb.component=contrib; deb.architecture=i386;deb.architecture=64bit-arm" http://www.jfrog.com/confluence/display/RTF/Debian+Repositories See: Specifying multiple layouts Change-Id: I25b2c3ed1cf71e25ad1be22e30518306e05e4603 --- artifactory.py | 2 +- test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artifactory.py b/artifactory.py index 5bb7bf5..c576d69 100755 --- a/artifactory.py +++ b/artifactory.py @@ -216,7 +216,7 @@ def encode_matrix_parameters(parameters): for param in iter(sorted(parameters)): if isinstance(parameters[param], (list, tuple)): - value = ','.join(parameters[param]) + value = (';%s=' % (param)).join(parameters[param]) else: value = parameters[param] diff --git a/test.py b/test.py index 5bcf95f..512fdba 100755 --- a/test.py +++ b/test.py @@ -29,7 +29,7 @@ def test_matrix_encode(self): s = artifactory.encode_matrix_parameters(params) - self.assertEqual(s, "baz=bar,quux;foo=asdf") + self.assertEqual(s, "baz=bar;baz=quux;foo=asdf") class ArtifactoryFlavorTest(unittest.TestCase):