From cbf7417d1d57941ec058079c7b75e24dac00cd02 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 14 Feb 2012 00:34:26 +0100 Subject: [PATCH] xbps_transaction_install_pkg: return EEXIST if pkg already installed. --- include/xbps_api.h | 4 ++-- lib/transaction_ops.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xbps_api.h b/include/xbps_api.h index e452baac..12d8234c 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -56,7 +56,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.4" -#define XBPS_API_VERSION "20120129" +#define XBPS_API_VERSION "20120214" #define XBPS_VERSION "0.12" /** @@ -1315,7 +1315,7 @@ int xbps_remove_pkg_files(prop_dictionary_t dict, * even if package is already installed. * * @return 0 on success, otherwise an errno value. - * @retval ENODEV Package is already installed (reinstall wasn't enabled). + * @retval EEXIST Package is already installed (reinstall wasn't enabled). * @retval ENOENT Package not matched in repository pool. * @retval ENOTSUP No repositories are available. * @retval EINVAL Any other error ocurred in the process. diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index 43ce1a33..d239d727 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -252,7 +252,7 @@ xbps_transaction_install_pkg(const char *pkg, bool reinstall) prop_object_release(pkgd); if ((state == XBPS_PKG_STATE_INSTALLED) && !reinstall) { /* error out if pkg installed and no reinstall */ - return ENODEV; + return EEXIST; } }