From fa40928026bd31ebc398a91066efe6709838f9a3 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 16 Jan 2013 11:47:52 +0100 Subject: [PATCH] xbps-install: don't treat EEXIST as an error when installing pkgs. Thanks to pancake for the bug hunting. --- NEWS | 3 +++ bin/xbps-install/transaction.c | 1 + 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 5e6f5767..45fac63c 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ 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 from some https servers. diff --git a/bin/xbps-install/transaction.c b/bin/xbps-install/transaction.c index b91448b0..480faeb4 100644 --- a/bin/xbps-install/transaction.c +++ b/bin/xbps-install/transaction.c @@ -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 == EEXIST) { printf("Package `%s' already installed.\n", pkg); + rv = 0; } else if (rv == ENOENT) { fprintf(stderr, "Unable to locate '%s' in " "repository pool.\n", pkg);