index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2009-09-15 12:30:32 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-09-20 12:01:25 -0500 |
commit | ef3716877032941f7882c11c5a091abef95ef983 (patch) | |
tree | d67e75fb6c9c29a2252d44cc32b04310cdd51fa6 | |
parent | 481014e944731e2756e16a7283f8a10498cadba4 (diff) |
-rw-r--r-- | src/pacman/remove.c | 26 |
diff --git a/src/pacman/remove.c b/src/pacman/remove.c index ced4e12f..6d44350b 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -115,23 +115,19 @@ int pacman_remove(alpm_list_t *targets) goto cleanup; } - /* Warn user in case of dangerous operation */ - if(config->flags & PM_TRANS_FLAG_RECURSE || - config->flags & PM_TRANS_FLAG_CASCADE) { - /* list transaction targets */ - alpm_list_t *pkglist = alpm_trans_get_remove(); - - display_targets(pkglist, 0); - printf("\n"); - - /* get confirmation */ - if(yesno(_("Do you want to remove these packages?")) == 0) { - retval = 1; - goto cleanup; - } + /* Step 3: actually perform the removal */ + alpm_list_t *pkglist = alpm_trans_get_remove(); + if(pkglist == NULL) { + goto cleanup; /* we are done */ + } + /* print targets and ask user confirmation */ + display_targets(pkglist, 0); + printf("\n"); + if(yesno(_("Do you want to remove these packages?")) == 0) { + retval = 1; + goto cleanup; } - /* Step 3: actually perform the removal */ if(alpm_trans_commit(NULL) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerrorlast()); |