'integer expression expected' errors on Ubuntu

Bug #1796174 reported by iain MacDonnell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
iain MacDonnell

Bug Description

With USE_PYTHON3 on Ubuntu, we get:

.../devstack/inc/python: line 52: [: 16.04: integer expression expected

Apparently the old-style test attempts to evaluate the RHS of the '-a' expression, even if the LHS evaluates to false.

It's somewhat cosmetic (it fails in the right direction), but ugly.

bash-style tests, [[...]], don't have this issue.

Changed in devstack:
assignee: nobody → iain MacDonnell (imacdonn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/608065

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/608065
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=e991f7da457e0f1343ca13e8adeb0f6334b04990
Submitter: Zuul
Branch: master

commit e991f7da457e0f1343ca13e8adeb0f6334b04990
Author: imacdonn <email address hidden>
Date: Thu Oct 4 19:41:59 2018 +0000

    Use bash-style test for Fedora version

    Old-style test fails on Ubuntu when python3 enabled, with:

    .../devstack/inc/python: line 52: [: 16.04: integer expression expected

    Use bash-style test, which doesn't attempt to evaluate the RHS if the
    LHS evaluates to false

    Change-Id: If18031ab98c9060e5825c3a8d3c647bd3705cd9c
    Closes-Bug: #1796174

Changed in devstack:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.