From b5bb1debe4f1686aa018cc941389ced8c4b97cbb Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 14 Jan 2013 14:01:35 +0100 Subject: [PATCH] Partial revert of 5d59a15faf67d921dfb190195c07bf4a70bca137. Error out if "pre-remove" script action fails, otherwise package is removed but its files are still there (ouch). --- NEWS | 3 --- lib/package_remove.c | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 7764a12f..5e6f5767 100644 --- a/NEWS +++ b/NEWS @@ -12,9 +12,6 @@ xbps-0.20 (???): --enable-debug --enable-tests - * libxbps: when removing a package and if executing its "pre-remove" - action fails, still continue removing this package. - * libxbps: fixed a stupid typo that made it to skip executing the "pre-remove" action in installed packages. diff --git a/lib/package_remove.c b/lib/package_remove.c index a207fc01..4e69e826 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -264,9 +264,8 @@ xbps_remove_pkg(struct xbps_handle *xhp, errno, pkgname, version, "%s: [remove] REMOVE script failed to " "execute pre ACTION: %s", - pkgver, strerror(errno)); - rv = errno; - goto purge; + pkgver, strerror(rv)); + goto out; } } /*