branching scripts fail due to unexpected operator in repo forall sub-script

Bug #1883772 reported by Saul Wold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Saul Wold

Bug Description

When running the branching/create_branches_and_tags.sh script, I was seeing errors similar to this:

 if [ $REPO_PATH == cgcs-root ]; then echo $REPO_PROJECT; fi: 1: [: cgcs-root: unexpected operator

This is due to the double '==' in the if statement. When changed to the single '=', which is the more correct form, this if statement works correctly.

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

Fix proposed to branch: master
Review: https://review.opendev.org/735993

Changed in starlingx:
status: New → In Progress
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as high priority assuming this is required to enable the stx.4.0 RC1 branch creation.

tags: added: stx.build
tags: added: stx.4.0
Changed in starlingx:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/735993
Committed: https://git.openstack.org/cgit/starlingx/root/commit/?id=4cb7539a9f676f652fbb4823caf721065db1352a
Submitter: Zuul
Branch: master

commit 4cb7539a9f676f652fbb4823caf721065db1352a
Author: Saul Wold <email address hidden>
Date: Tue Jun 16 11:34:51 2020 -0700

    use single '=' for string equality in repo forall

    The sub-script fails when a double '==' is used inside of a repo
    forall -c option. The single '=' is preferred when used in 'test'
    or '['.

    The error is similar to this:
    if [ $REPO_PATH == cgcs-root ]; then echo $REPO_PROJECT; fi: 1: [: cgcs-root: unexpected operator

    Closes-Bug: 1883772
    Change-Id: If17de30a03939240f0cc329179d452820a691e32
    Signed-off-by: Saul Wold <email address hidden>

Changed in starlingx:
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.