xbps-repo: index: don't write plist if no changes were made.

This commit is contained in:
Juan RP 2012-06-01 17:03:05 +02:00
parent 3399184511
commit 06034ea928

View File

@ -202,6 +202,7 @@ add_binpkg_to_index(prop_array_t idx,
prop_object_release(newpkgd); prop_object_release(newpkgd);
printf("index: removed obsolete binpkg %s.\n", buf); printf("index: removed obsolete binpkg %s.\n", buf);
free(buf); free(buf);
rv = EEXIST;
goto out; goto out;
} }
/* current binpkg is greater than idx version */ /* current binpkg is greater than idx version */
@ -257,8 +258,7 @@ add_binpkg_to_index(prop_array_t idx,
rv = errno; rv = errno;
goto out; goto out;
} }
sha256 = xbps_file_hash(file); if ((sha256 = xbps_file_hash(file)) == NULL) {
if (sha256 == NULL) {
prop_object_release(newpkgd); prop_object_release(newpkgd);
rv = errno; rv = errno;
goto out; goto out;