Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osc:build: Avoid piping "yes" when build root is broken #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.4
1.3.5
11 changes: 8 additions & 3 deletions lib/tasks/osc.rake
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,17 @@ namespace :osc do
Dir.chdir osc_checkout_dir do
puts "building package..." if verbose

# pipe yes to osc build to automatic rebuild broken build root if it happen
command = "yes | osc -A '#{obs_api}' build"
# have separated roots per target system, so sharing is more efficient
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see twice identical comment, see line 167

broot = "/var/tmp/build-root-#{build_dist}"
command = "osc -A '#{obs_api}' build"
command << " --no-verify" #ignore untrusted BS projects
command << " --release=1" #have always same release number
# have separated roots per target system, so sharing is more effficient
command << " --root=/var/tmp/build-root-#{build_dist}"
command << " --root=#{broot}"
# avoid an interactive question, bsc#1053839
if File.exist?("#{broot}/not-ready")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, what? who create file? where it is documented? any documentation for that not-ready file would be good. Do not forget that this packaging rake tasks is used for multiple projects, not only libstorage or yast.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see your point.

This PR replaces a yes | workaround by something which is still a workaround. not-ready is an implementation detail of init_buildsystem, which is part of build.rpm, on which osc depends.

I considered init_buildsystem a more stable thing than osc. Do you think we should press to have https://bugzilla.suse.com/show_bug.cgi?id=1053839 fixed instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upstream fixes is always nice to have :), but if you document this, I am, also fine with this File exists stuff

command << " --clean"
end
# store packages for given base system at one place, so it spped up rebuild
command << " --keep-pkgs=#{pkg_dir}"
command << " #{args[:osc_options]}"
Expand Down
6 changes: 6 additions & 0 deletions package/rubygem-packaging_rake_tasks.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 15 12:21:30 UTC 2017 - mvidner@suse.com

- osc:build: Avoid piping "yes" when build root is broken (bsc#1053839)
- 1.3.5

-------------------------------------------------------------------
Thu Jul 13 09:25:16 UTC 2017 - mvidner@suse.com

Expand Down