1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

fixed HoldPkg implementation

This commit is contained in:
Aurelien Foret 2006-03-02 20:53:41 +00:00
parent dfa1a2a13a
commit e50f76bf7c

View File

@ -87,6 +87,13 @@ int pacman_remove(list_t *targets)
} }
/* and add targets to it */ /* and add targets to it */
for(i = finaltargs; i; i = i->next) { 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) { if(alpm_trans_addtarget(i->data) == -1) {
ERR(NL, "failed to add target '%s' (%s)\n", (char *)i->data, alpm_strerror(pm_errno)); ERR(NL, "failed to add target '%s' (%s)\n", (char *)i->data, alpm_strerror(pm_errno));
retval = 1; retval = 1;