- found = zpm_package_hash(&pkg, pkgid, hash);
- char *ehash = zpm_db_string(&pkg, "select hash from packages_pkgid where pkgid = %Q", pkgid);
- if (ehash && found && !strcmp(ehash, hash)) {
- found = 1;
- } else {
- found = 0;
+ checkfail = 1;
+ if (current) {
+ zpm_package_hash(&pkg, pkgid, hash);
+ checkfail = strcmp(current, hash);