diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2017-11-15 12:59:53 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-11-15 15:53:38 -0500 |
commit | 3051160f23fe8e06e545859538c86ef3a3c39d7a (patch) | |
tree | 97f922e30173df31dda04f10cca3beea27652eb8 /meta-openstack/recipes-devtools/python/python-rally_git.bb | |
parent | 3d512115129e2cea97067d23cb72fea62b70dd39 (diff) | |
download | meta-cloud-services-3051160f23fe8e06e545859538c86ef3a3c39d7a.tar.gz |
python-*: fixup postinst scripts
Checking for "$D" and doing an "exit 1" now results in errors such as:
[log_check] warning: %post(keystone-cronjobs-...) scriptlet failed, exit status 2
during image creation. Instead of escaping the script for "level-1"
(image creation postinst) we wrap the "level-2" (first boot) postinst
in an if statement. This also ensure the scriptlet in
indentity.bbclass is less prone to behaving differently based on the
postinsts defined in the classes which inherit 'identity'.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-rally_git.bb')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-rally_git.bb | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-rally_git.bb b/meta-openstack/recipes-devtools/python/python-rally_git.bb index d29e7cb..31d4242 100644 --- a/meta-openstack/recipes-devtools/python/python-rally_git.bb +++ b/meta-openstack/recipes-devtools/python/python-rally_git.bb | |||
@@ -63,22 +63,20 @@ do_install_append() { | |||
63 | } | 63 | } |
64 | 64 | ||
65 | pkg_postinst_${SRCNAME}-setup () { | 65 | pkg_postinst_${SRCNAME}-setup () { |
66 | if [ "x$D" != "x" ]; then | 66 | if [ -z "$D" ]; then |
67 | exit 1 | 67 | # This is to make sure postgres is configured and running |
68 | if ! pidof postmaster > /dev/null; then | ||
69 | /etc/init.d/postgresql-init | ||
70 | /etc/init.d/postgresql start | ||
71 | fi | ||
72 | |||
73 | if [ ! -d /var/log/rally ]; then | ||
74 | mkdir /var/log/rally | ||
75 | fi | ||
76 | |||
77 | sudo -u postgres createdb rally | ||
78 | rally-manage db recreate | ||
68 | fi | 79 | fi |
69 | |||
70 | # This is to make sure postgres is configured and running | ||
71 | if ! pidof postmaster > /dev/null; then | ||
72 | /etc/init.d/postgresql-init | ||
73 | /etc/init.d/postgresql start | ||
74 | fi | ||
75 | |||
76 | if [ ! -d /var/log/rally ]; then | ||
77 | mkdir /var/log/rally | ||
78 | fi | ||
79 | |||
80 | sudo -u postgres createdb rally | ||
81 | rally-manage db recreate | ||
82 | } | 80 | } |
83 | 81 | ||
84 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-api ${SRCNAME} ${SRCNAME}-setup" | 82 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-api ${SRCNAME} ${SRCNAME}-setup" |