Fix #53 (xbps-install with multiple arguments shouldn't fail if one is already installed).

This commit is contained in:
Juan RP
2014-08-23 08:02:40 +02:00
parent 7cef93ce07
commit 4c14785480
6 changed files with 50 additions and 2 deletions

View File

@@ -238,7 +238,9 @@ main(int argc, char **argv)
/* Install target packages */
for (i = optind; i < argc; i++) {
rv = install_new_pkg(&xh, argv[i], reinstall);
if (rv != 0) {
if (optind >= 2 && rv == EEXIST) {
rv = 0;
} else if (rv != 0) {
xbps_pkgdb_unlock(&xh);
exit(rv);
}