Bug ID 1053839
Summary osc build / init_buildsystem require interaction to ask about cleaning the build root
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee adrian@suse.com
Reporter mvidner@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

init_buildsystem (build.rpm, https://github.com/openSUSE/obs-build ), called by
osc build, may stop and ask the user
if a previous build left the build-root in an "incomplete" state, like this:

[    0s] It seems that there was an incomplete setup of
/var/tmp/build-root-git-to-obs.
[    0s] To be sure, we will build it again completely...
[    0s] Your build system is broken!! Shall I execute
[    0s] 
[    0s]     rm -rf -- /var/tmp/build-root-git-to-obs/*
[    0s] 
[    0s] y - yes, cleanup the build root
[    0s] N - No, abort build (default on enter)
[    0s] c - Continue anyway with this build root
[    0s] [y/N/c] 
[    0s] yast-jenkins failed "build libstorage-ng.spec" at Tue Aug 15 09:24:39
UTC 2017.

This is a problem for continuous integration where there is no user to decide.
AFAIK there is no option to provide answers for this, and we have resorted to
piping "yes |" in our scripts (
https://github.com/openSUSE/packaging_rake_tasks/commit/807cf9a84d84e552cd24aa1307303d923e1aac44
)
But "yes |" is such a crude hack, so I want a better solution.

One possibility is to always pass the --clean option.

My preferred way would be a new --clean-if-dirty option. Isn't that even always
desirable? I can imagine a use for --fail-if-dirty, but not for
--continue-if-dirty.

Meanwhile I have implemented a workaround:

    if [ -f $BROOT/not-ready ]; then
      osc build --root $BROOT --clean ...
    else
      osc build --root $BROOT ...
    fi

so feel free to WontFix this.


You are receiving this mail because: