Commit 5c2059db authored by Eli Schwartz's avatar Eli Schwartz Committed by Allan McRae
Browse files

makepkg: only run --clean actions if we built a package



Fixes issue where users were allowed to run cleanup while running
--geninteg or --printsrcinfo or --packagelist, thus mixing invalid
responses into stdout.

Signed-off-by: Eli Schwartz's avatarEli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 0272fca9
......@@ -133,7 +133,7 @@ clean_up() {
rm "$logpipe"
fi
if (( (EXIT_CODE == E_OK || EXIT_CODE == E_INSTALL_FAILED) && CLEANUP )); then
if (( (EXIT_CODE == E_OK || EXIT_CODE == E_INSTALL_FAILED) && BUILDPKG && CLEANUP )); then
local pkg file
# If it's a clean exit and -c/--clean has been passed...
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment