8 int zpm_script_hash(struct zpm *zpm, char *pkgstr, char *phase, char *hash) {
10 char *template = "select hash from scripts_pkgid where pkgid = %q and phase = %q";
13 pkgid = zpm_findpkg(zpm, pkgstr);
15 st = zpm_dbquery(zpm, template, pkgid, phase);
22 switch (sqlite3_step(st)) {
24 strncpy(hash, (const char *) sqlite3_column_text(st, 0),
26 hash[ZPM_HASH_STRLEN] = 0;
28 default: zpm->error = 1; /* fall through */
31 return 0; break; /* not found */