Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-03-02 20:53:41 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-03-02 20:53:41 +0000
commite50f76bf7c76e61c4440407c917f38692bef3036 (patch)
tree24e917049e835aad7e2e074bb5011dc9984e8cd2 /src
parentdfa1a2a13ad202ff81a5b882920b86eff71e3344 (diff)
fixed HoldPkg implementation
Diffstat (limited to 'src')
-rw-r--r--src/pacman/remove.c7
1 files changed, 7 insertions, 0 deletions
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;