xbps-bin: check for EEXIST when installing a pkg.

This commit is contained in:
Juan RP 2012-02-18 16:15:54 +01:00
parent 7a9d47c133
commit 7fc8ee8231

View File

@ -267,7 +267,7 @@ install_new_pkg(const char *pkg, bool reinstall)
int rv; int rv;
if ((rv = xbps_transaction_install_pkg(pkg, reinstall)) != 0) { if ((rv = xbps_transaction_install_pkg(pkg, reinstall)) != 0) {
if (rv == ENODEV) { if (rv == EEXIST) {
printf("Package `%s' already installed.\n", pkg); printf("Package `%s' already installed.\n", pkg);
} else if (rv == ENOENT) { } else if (rv == ENOENT) {
xbps_error_printf("xbps-bin: unable to locate '%s' in " xbps_error_printf("xbps-bin: unable to locate '%s' in "