summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Stanley <fungi@yuggoth.org>2017-12-12 22:01:32 +0000
committerJeremy Stanley <fungi@yuggoth.org>2017-12-12 22:01:32 +0000
commit22284188fb43f6a053ed1f2e9496bcda028413f4 (patch)
treed29b892ac24012b80bc96253e920e304e214f1f1
parente02cfe94a364b9aa880d026c8e9089fe4ffb2829 (diff)
Quote arguments to the test command
When testing to see whether the installed subunit2sql package matches the version available on PyPI, the first argument can be empty if the package has not yet been installed. Make sure these arguments are quoted so that the test command gets a syntax it can parse (rather than a string starting with a binary operator). Change-Id: Ia2e7165f851085328e00431a739cce17d2e494b2
Notes
Notes (review): Code-Review+2: Clark Boylan <cboylan@sapwetik.org> Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 13 Dec 2017 04:31:34 +0000 Reviewed-on: https://review.openstack.org/527532 Project: openstack-infra/puppet-subunit2sql Branch: refs/heads/master
-rw-r--r--manifests/init.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index fdf2666..e05426e 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -50,7 +50,7 @@ class subunit2sql (
50 # deps we've preinstalled from system packages because they lack wheels on 50 # deps we've preinstalled from system packages because they lack wheels on
51 # PyPI and must be otherwise rebuilt from sdist instead (specifically 51 # PyPI and must be otherwise rebuilt from sdist instead (specifically
52 # netifaces). 52 # netifaces).
53 onlyif => '/bin/bash -c "test $(pip list --format columns | sed -ne \'s/^subunit2sql\s\+\(.*\)$/\1/p\') != $(pip search \'subunit2sql$\' | sed -ne \'s/^subunit2sql (\(.*\)).*$/\1/p\')"', 53 onlyif => '/bin/bash -c "test \\"$(pip list --format columns | sed -ne \'s/^subunit2sql\s\+\(.*\)$/\1/p\')\\" != \\"$(pip search \'subunit2sql$\' | sed -ne \'s/^subunit2sql (\(.*\)).*$/\1/p\')\\""',
54 require => [ 54 require => [
55 Class['pip'], 55 Class['pip'],
56 Package['python-mysqldb'], 56 Package['python-mysqldb'],