+ if (check || showcurrent) {
+ current = zpm_db_string(&pkg, "select hash from packages_pkgid where pkgid = %Q", pkgid);
+ }
+
+ if (check) {
+ checkfail = 1;
+ if (current) {
+ zpm_package_hash(&pkg, pkgid, hash);
+ checkfail = strcmp(current, hash);
+ }
+ } else if (set) {
+ zpm_package_sethash(&pkg, pkgid, hash);
+ } else if (clear) {
+ zpm_package_sethash(&pkg, pkgid, NULL);
+ display = NULL;
+ } else if (showcurrent) {
+ display = current;