diff options
author | Zac Medico <zmedico@gentoo.org> | 2017-08-16 15:56:37 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2017-08-16 16:00:20 -0700 |
commit | 2e18650ca6535305920d84c924a14e2c819a15a6 (patch) | |
tree | 3a8f10491eb886569bd9d53b21179a9d8f8062c9 | |
parent | quickpkg: revert premature return from quickpkg_atom (bug 628060) (diff) | |
download | portage-2e18650ca6535305920d84c924a14e2c819a15a6.tar.gz portage-2e18650ca6535305920d84c924a14e2c819a15a6.tar.bz2 portage-2e18650ca6535305920d84c924a14e2c819a15a6.zip |
quickpkg: handle unsuccessful compressor exit in quickpkg_atom
Fixes: cff2c0149142 ("Support different compressors for binary packages")
-rwxr-xr-x | bin/quickpkg | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/quickpkg b/bin/quickpkg index 81d6afa08..faf1eddd4 100755 --- a/bin/quickpkg +++ b/bin/quickpkg @@ -163,7 +163,16 @@ def quickpkg_atom(options, infos, arg, eout): with tarfile.open(mode="w|",format=tarfile.PAX_FORMAT if xattrs else tarfile.DEFAULT_FORMAT, fileobj=proc.stdin) as tar: tar_contents(contents, root, tar, protect=protect, xattrs=xattrs) proc.stdin.close() - proc.wait() + if proc.wait() != os.EX_OK: + eout.eend(1) + eout.eerror("Compressor failed for package %s" % cpv) + retval |= 1 + try: + os.unlink(binpkg_tmpfile) + except OSError as e: + if e.errno not in (errno.ENOENT, errno.ESTALE): + raise + continue xpak.tbz2(binpkg_tmpfile).recompose_mem(xpdata) finally: if have_lock: |