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

Avoid Traceback for resultdir ENOSPC #1331

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions mock/py/mockbuild/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,12 @@ def get_command(mode, checkdeps=False):
def copy_build_results(self, results):
self.buildroot.root_log.debug("Copying packages to result dir")
ret = []
for item in results:
shutil.copy2(item, self.buildroot.resultdir)
ret.append(os.path.join(self.buildroot.resultdir, os.path.split(item)[1]))
try:
for item in results:
shutil.copy2(item, self.buildroot.resultdir)
ret.append(os.path.join(self.buildroot.resultdir, os.path.split(item)[1]))
except OSError as err:
raise Error(f"Can not copy {item} into resultdir {self.buildroot.resultdir}: {err}") from err
return ret

@traceLog()
Expand Down
3 changes: 3 additions & 0 deletions releng/release-notes-next/rhbz-2254328.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
No more ugly tracebacks for "no space left on device" (and similar
`OSError`s) related to copying built artifacts to `--resultdir`,
[rhbz#2261758][].
Loading