From e50f76bf7c76e61c4440407c917f38692bef3036 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Thu, 2 Mar 2006 20:53:41 +0000 Subject: fixed HoldPkg implementation --- src/pacman/remove.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pacman/remove.c b/src/pacman/remove.c index c3ac8f88..5c8568ca 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -87,6 +87,13 @@ int pacman_remove(list_t *targets) } /* and add targets to it */ for(i = finaltargs; i; i = i->next) { + /* check if the package is in the HoldPkg list. If so, ask + * confirmation first */ + if(list_is_strin(i->data, config->holdpkg)) { + if(!yesno(":: %s is designated as a HoldPkg. Remove anyway? [Y/n] ", i->data)) { + return(1); + } + } if(alpm_trans_addtarget(i->data) == -1) { ERR(NL, "failed to add target '%s' (%s)\n", (char *)i->data, alpm_strerror(pm_errno)); retval = 1; -- cgit v1.2.3-24-g4f1b