From 9b7a658e442393b868dd55215cc27385018208a2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 9 Aug 2009 23:33:13 +0200 Subject: [PATCH] xbps_remove_pkg: unregister and remove metadata in updates for now. --HG-- extra : convert_revision : c5c8dc4c32199b1f0e4e26883cadea379a6e4239 --- lib/remove.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/lib/remove.c b/lib/remove.c index 2b49cc02527..85db221e58a 100644 --- a/lib/remove.c +++ b/lib/remove.c @@ -367,19 +367,14 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update) if (rv != 0) return rv; - if (update == false) { - /* - * Unregister pkg from database. - */ - rv = xbps_unregister_pkg(pkgname); - if (rv != 0) - return rv; + /* + * Unregister pkg from database. + */ + if ((rv = xbps_unregister_pkg(pkgname)) != 0) + return rv; - /* - * Remove pkg metadata directory. - */ - return remove_pkg_metadir(pkgname); - } - - return 0; + /* + * Remove pkg metadata directory. + */ + return remove_pkg_metadir(pkgname); }