xbps-pkgdb: if pkg metafile cannot be internalized print a proper errmsg.

This commit is contained in:
Juan RP 2015-05-28 09:44:01 +02:00
parent 42831b97d4
commit c4ed1b5845

View File

@ -96,7 +96,12 @@ check_pkg_integrity(struct xbps_handle *xhp,
xhp->metadir, pkgname);
assert(buf);
filesd = xbps_dictionary_internalize_from_zfile(buf);
assert(filesd);
if (filesd == NULL) {
fprintf(stderr, "%s: cannot read %s, ignoring...\n",
pkgname, buf);
free(buf);
return -1;
}
rv = xbps_file_hash_check(buf, sha256);
free(buf);
if (rv == ENOENT) {