From 06034ea928b0206896f74e9cc933db15251c9667 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 1 Jun 2012 17:03:05 +0200 Subject: [PATCH] xbps-repo: index: don't write plist if no changes were made. --- bin/xbps-repo/index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xbps-repo/index.c b/bin/xbps-repo/index.c index 053b62f6..58f7f1e9 100644 --- a/bin/xbps-repo/index.c +++ b/bin/xbps-repo/index.c @@ -202,6 +202,7 @@ add_binpkg_to_index(prop_array_t idx, prop_object_release(newpkgd); printf("index: removed obsolete binpkg %s.\n", buf); free(buf); + rv = EEXIST; goto out; } /* current binpkg is greater than idx version */ @@ -257,8 +258,7 @@ add_binpkg_to_index(prop_array_t idx, rv = errno; goto out; } - sha256 = xbps_file_hash(file); - if (sha256 == NULL) { + if ((sha256 = xbps_file_hash(file)) == NULL) { prop_object_release(newpkgd); rv = errno; goto out;