Skip to content

Commit

Permalink
Explicitly clean the mock chroot before building.
Browse files Browse the repository at this point in the history
Experienced a situation where mock failed to build the packages
because systemd-nspawn failed.
Cleaning the chroots before rebuild (both regular and bootstrap)
fixed the problem. Adding commands to do this explicitly during
the build process.
  • Loading branch information
oyvindhagberg committed Feb 6, 2018
1 parent ea8147c commit 7a37094
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpm/buildrpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ do
echo "--------------------------------------------------------"
echo " Mock-building packages for $config"
echo "--------------------------------------------------------"
mock --root=$config --quiet --clean
mock --bootstrap-chroot --root=$config --quiet --clean
if ! mock --bootstrap-chroot --root=$config --quiet --rebuild $srpm; then
echo "Mock build failed for $config."
echo "------------ build.log -------------"
Expand Down

1 comment on commit 7a37094

@oyvindhagberg
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please sign in to comment.