summaryrefslogtreecommitdiffstats
path: root/src/pacman/upgrade.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-07-15 19:14:01 +0200
committerDan McGee <dan@archlinux.org>2009-09-09 05:17:41 +0200
commit8ff3b87066d35d3518a3cd0bef27b86c3a85e983 (patch)
treea91691dccfa92d3021229f263b616ca4e35b5deb /src/pacman/upgrade.c
parent0da96abc900560f21c643b255c94a60232f4a24b (diff)
downloadpacman-8ff3b87066d35d3518a3cd0bef27b86c3a85e983.tar.gz
pacman-8ff3b87066d35d3518a3cd0bef27b86c3a85e983.tar.xz
Remove transaction type
This basically started with this change : /* Transaction */ struct __pmtrans_t { - pmtranstype_t type; pmtransflag_t flags; pmtransstate_t state; - alpm_list_t *packages; /* list of (pmpkg_t *) */ + alpm_list_t *add; /* list of (pmpkg_t *) */ + alpm_list_t *remove; /* list of (pmpkg_t *) */ And then I have to modify all the code accordingly.
Diffstat (limited to 'src/pacman/upgrade.c')
-rw-r--r--src/pacman/upgrade.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index dc82e4de..936e2592 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -42,7 +42,6 @@
int pacman_upgrade(alpm_list_t *targets)
{
alpm_list_t *i, *data = NULL;
- pmtranstype_t transtype = PM_TRANS_TYPE_UPGRADE;
int retval = 0;
if(targets == NULL) {
@@ -65,7 +64,7 @@ int pacman_upgrade(alpm_list_t *targets)
}
/* Step 1: create a new transaction */
- if(trans_init(transtype, config->flags) == -1) {
+ if(trans_init(config->flags) == -1) {
return(1);
}
@@ -73,7 +72,7 @@ int pacman_upgrade(alpm_list_t *targets)
printf(_("loading package data...\n"));
for(i = targets; i; i = alpm_list_next(i)) {
char *targ = alpm_list_getdata(i);
- if(alpm_trans_addtarget(targ) == -1) {
+ if(alpm_trans_add(targ) == -1) {
pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n",
targ, alpm_strerrorlast());
trans_release();
@@ -131,12 +130,13 @@ int pacman_upgrade(alpm_list_t *targets)
/* Step 3: perform the installation */
/* print targets and ask user confirmation */
- alpm_list_t *packages = alpm_trans_get_pkgs();
+ alpm_list_t *packages = alpm_trans_get_add();
if(packages == NULL) { /* we are done */
trans_release();
return(retval);
}
- display_synctargets(packages);
+ display_targets(alpm_trans_get_remove(), 0);
+ display_targets(alpm_trans_get_add(), 1);
printf("\n");
int confirm = yesno(_("Proceed with installation?"));
if(!confirm) {