xbps-install: don't treat EEXIST as an error when installing pkgs.

Thanks to pancake for the bug hunting.
This commit is contained in:
Juan RP 2013-01-16 11:47:52 +01:00
parent e75fcdd567
commit fa40928026
2 changed files with 4 additions and 0 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.20 (???): xbps-0.20 (???):
* xbps-install: don't treat EEXIST as an error when installing
new packages; technically it's not an error.
* libfetch: added a patch to fix select(2) timing out when fetching * libfetch: added a patch to fix select(2) timing out when fetching
from some https servers. from some https servers.

View File

@ -218,6 +218,7 @@ install_new_pkg(struct xbps_handle *xhp, const char *pkg, bool reinstall)
if ((rv = xbps_transaction_install_pkg(xhp, pkg, reinstall)) != 0) { if ((rv = xbps_transaction_install_pkg(xhp, pkg, reinstall)) != 0) {
if (rv == EEXIST) { if (rv == EEXIST) {
printf("Package `%s' already installed.\n", pkg); printf("Package `%s' already installed.\n", pkg);
rv = 0;
} else if (rv == ENOENT) { } else if (rv == ENOENT) {
fprintf(stderr, "Unable to locate '%s' in " fprintf(stderr, "Unable to locate '%s' in "
"repository pool.\n", pkg); "repository pool.\n", pkg);