requirements_style_check.sh does not sort correctly on Mac

Bug #1324945 reported by andersonvom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
andersonvom

Bug Description

The sort command on Mac doesn't seem to have the same default sorting options that the Linux one does, so when checking the style of requirements.txt, it will output the incorrect sorting and fail the tests. The Linux sort takes only alphanumeric characters into account, thus not having this problem.

E.g.:

*** 26,27 ****
- SQLAlchemy>=0.7.8,<=0.9.99
  sqlalchemy-migrate>=0.9.1
--- 26,27 ----
  sqlalchemy-migrate>=0.9.1
+ SQLAlchemy>=0.7.8,<=0.9.99

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

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

Changed in heat:
assignee: nobody → andersonvom (andersonvom)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/96772
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=797dcc8dc19c8bf74252a6713efd2c87e7591bc9
Submitter: Jenkins
Branch: master

commit 797dcc8dc19c8bf74252a6713efd2c87e7591bc9
Author: Anderson Mesquita <email address hidden>
Date: Fri May 30 10:01:59 2014 -0400

    Fix requirements_style_check on BSD platforms

    On Linux, the sort command implicitly ignore non-alphanumeric characters
    when sorting. Since the '>' character has an ASCII value greater than
    the '-' character, the following list will be sorted on Linux, but not
    on a Mac:

    SQLAlchemy>=0.7.8,<=0.9.99
    sqlalchemy-migrate>=0.9.1

    This makes sort explicitly ignore such characters and will keep the
    tests consistent across different environments.

    Closes-Bug: #1324945
    Change-Id: I559ae4b4c3e2a7d190af9d4b1517dfaf23d114b1

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-1 → 2014.2
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.