xbps-install(1): do not exit if pkg is up-to-date in dry-run mode.

Close #145
This commit is contained in:
Juan RP
2016-02-05 11:27:40 +01:00
parent 0fa676f50c
commit b759ca4b07
3 changed files with 36 additions and 1 deletions

View File

@@ -239,9 +239,12 @@ main(int argc, char **argv)
rv = dist_upgrade(&xh, maxcols, yes, drun);
} else if (update) {
/* Update target packages */
int npkgs = argc - optind;
for (i = optind; i < argc; i++) {
rv = update_pkg(&xh, argv[i]);
if (rv != 0) {
if (npkgs >= 2 && rv == EEXIST) {
rv = 0;
} else if (rv != 0) {
xbps_end(&xh);
exit(rv);
}