From b017f6d02418942467f0c7190ed2c34a741b1cc9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 16 Dec 2010 11:37:31 +0100 Subject: [PATCH] xbps-repo: fix the 'genindex' target due to 0.7.0 API changes. --- bin/xbps-repo/index.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/xbps-repo/index.c b/bin/xbps-repo/index.c index 626e1e33..f133e5b6 100644 --- a/bin/xbps-repo/index.c +++ b/bin/xbps-repo/index.c @@ -150,7 +150,7 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir, } if (remove(oldfilepath) == -1) { fprintf(stderr, "E: Couldn't remove old package file " - "'%s'!\n", oldfilen); + "'%s'! (%s)\n", oldfilepath, strerror(errno)); free(oldfilepath); prop_object_release(newpkgd); rv = errno; @@ -163,8 +163,9 @@ xbps_repo_addpkg_index(prop_dictionary_t idxdict, const char *filedir, rv = errno; goto out; } - if ((rv = xbps_remove_pkg_from_dict(idxdict, - "packages", pkgname)) != 0) { + if (!xbps_remove_pkg_from_dict(idxdict, "packages", pkgname)) { + fprintf(stderr, "E: couldn't remove %s dict from " + "index (%s)\n", pkgname, strerror(errno)); prop_object_release(newpkgd); free(tmpstr); goto out;