From 90b9325fbd315b35858770dcf08603a6deb6fe38 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 10 Aug 2009 00:33:11 +0200 Subject: [PATCH] xbps_remove_pkg: don't unregister pkg while updating. --HG-- extra : convert_revision : 94b1a99f3799838f676a496028032347b40210d3 --- lib/remove.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/remove.c b/lib/remove.c index 85db221e58a..402944d7a93 100644 --- a/lib/remove.c +++ b/lib/remove.c @@ -367,11 +367,13 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update) if (rv != 0) return rv; - /* - * Unregister pkg from database. - */ - if ((rv = xbps_unregister_pkg(pkgname)) != 0) - return rv; + if (update == false) { + /* + * Unregister pkg from database. + */ + if ((rv = xbps_unregister_pkg(pkgname)) != 0) + return rv; + } /* * Remove pkg metadata directory.