build-pkgs: "exit on failure" feature broken

Bug #2054720 reported by Davlet Panech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
hqbai

Bug Description

Brief Description
-----------------
The "-e" option ("exit on fail") of build-pkgs script doesn't work.

Severity
--------
Minor

Steps to Reproduce
------------------

(Approximate)
* create a package that fails during the build
* try to build it with "-e"

Expected Behavior
------------------
build-pkgs exits immediately upon encountering a build error

Actual Behavior
----------------
build-pkgs keeps trying to build the package (and any other packages, depending on the command line args).

Reproducibility
---------------
Reproducible

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master/2024-02-22

Last Pass
---------
Unknown

Timestamp/Logs
--------------
N/A

Test Activity
-------------
N/A

Workaround
----------
* Terminate the script with "CTRL+C".
* Exit "stx shell" and run "stx-init-env --reset". Reason: CTRL+C may corrupt the chroot and confuse the pkg-builder container, the "stx-init-env --reset" will fix it.

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/c/starlingx/root/+/910370

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

Reviewed: https://review.opendev.org/c/starlingx/root/+/910370
Committed: https://opendev.org/starlingx/root/commit/48ad94bac0752103121a7cf36a3fc66d9ecb969f
Submitter: "Zuul (22348)"
Branch: master

commit 48ad94bac0752103121a7cf36a3fc66d9ecb969f
Author: Haiqing Bai <email address hidden>
Date: Fri Feb 23 02:19:31 2024 +0800

    build-pkgs: Fixed "exit on failure" feature broken

    "-e" option of build-pkgs means exiting on any package
    build failure instead of continuing to run. This feature
    was broken during the code merging, now brings the feature
    back.

    Test Plan:
    Pass: For monolithic build, package build failure should
          result in a safe exit with '-e' option:
          build-pkgs -e

    Pass: For single build with '-p', package build failure
          should result in a safe exit with '-e' option:
          build-pkgs -e -p <packages>

    Closes-bug: 2054720

    Change-Id: I5bf2089aa3559a8131f0e238a75edea87733dea6
    Signed-off-by: Haiqing Bai <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0 stx.build
Changed in starlingx:
assignee: nobody → hqbai (hbai)
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.