index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <chantry.xavier@gmail.com> | 2010-10-17 11:16:27 +0200 |
---|---|---|
committer | Xavier Chantry <chantry.xavier@gmail.com> | 2011-01-29 19:33:16 +0100 |
commit | 4a72c0964abc4b4836c2aafb9c59716299215802 (patch) | |
tree | 440b821dd0995ee011bbf0f7a15e3b7cebb45042 /src | |
parent | 953e0d48d7e6e3703bdaccef4ec2a8bbdbe460ed (diff) |
-rw-r--r-- | src/pacman/upgrade.c | 11 |
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 92a477e0..595e4aab 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -71,9 +71,18 @@ int pacman_upgrade(alpm_list_t *targets) /* add targets to the created transaction */ for(i = targets; i; i = alpm_list_next(i)) { char *targ = alpm_list_getdata(i); - if(alpm_add_target(targ) == -1) { + pmpkg_t *pkg; + + if(alpm_pkg_load(targ, 1, &pkg) != 0) { + pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", + targ, alpm_strerrorlast()); + trans_release(); + return(1); + } + if(alpm_add_pkg(pkg) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", targ, alpm_strerrorlast()); + alpm_pkg_free(pkg); trans_release(); return(1); } |