install-guides tox build error on Mac OS X

Bug #1619358 reported by Ian Y. Choi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Undecided
Ian Y. Choi

Bug Description

When I do my work using my laptop, I sometimes build docs to test in my local laptop environment.
It worked well. However, today I have found an error (more details: http://paste.openstack.org/show/565710/ )

===
Warning, treated as error:
/Users/ian/project/openstack/openstack-manuals/doc/install-guide/source/index.rst:1: ERROR: Error in "title" directive:
1 argument(s) required, 0 supplied.

.. title::

+ mv -f doc/install-guide/source/index.rst.save doc/install-guide/source/index.rst
ERROR: InvocationError: '/Users/ian/project/openstack/openstack-manuals/tools/build-install-guides-rst.sh'
___________________________________ summary ____________________________________
ERROR: install-guides: commands failed
===

Thanks to kind help from Andreas, it seemed that some operation behavior (e.g., sed) of build-install-guides-rst.sh in Mac OS X is not compatible with GNU based environment, since Mac OS X commands are BSD-compatible.

After the further investigation, I have found that a small behavior on 'grep' command worked differently:

[my Mac OS X laptop]
===
$ grep -m 1 -A 5 '^.. only:: obs' doc/install-guide/source/index.rst
.. only:: obs

===

[my local Ubuntu 14.04]
===
$ grep -m 1 -A 5 '^.. only:: obs' doc/install-guide/source/index.rst
.. only:: obs

   ======================================================================
   OpenStack Installation Tutorial for openSUSE and SUSE Linux Enterprise
   ======================================================================

===

I have identified that "-m 1" option in BSD grep generates only 1-line output although "-A 5" option was applied.

tamil vanan (tamilhce)
Changed in openstack-manuals:
assignee: nobody → tamil vanan (tamilhce)
assignee: tamil vanan (tamilhce) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (master)

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

Changed in openstack-manuals:
assignee: nobody → Ian Y. Choi (ianychoi)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/364404
Committed: https://git.openstack.org/cgit/openstack/openstack-manuals/commit/?id=6cb3801396dfdcf1cdb697a47ef058ac7b088267
Submitter: Jenkins
Branch: master

commit 6cb3801396dfdcf1cdb697a47ef058ac7b088267
Author: Ian Y. Choi <email address hidden>
Date: Fri Sep 2 00:35:23 2016 +0900

    Fix install-guides build in Mac OS X

    In Mac OS X environment, the actual behavior of grep command
    with "-m" option is different from the expected behavior.

    Instead of using "-m 1" option, adding one pipeline
    with "head -n 6" (since "-A 5" looks after 5 lines more)
    makes the build compatible not only Linux but also
    Mac OS X environment.

    Change-Id: I63fc0fd0c8afde883ffaf69c9b674c88d8079014
    Closes-Bug: #1619358

Changed in openstack-manuals:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-manuals 15.0.0

This issue was fixed in the openstack/openstack-manuals 15.0.0 release.

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.