if (!zpm_extract(&zpm, hash, script, 0700)) {
fprintf(stderr, "unable to extract script");
fail = HARD;
+ zpm_note_add(&zpm, pkgid, NULL, hash, "unable to extract %s script", phase);
goto cleanup;
}
if (rv) {
fprintf(stderr, "package %s script failed with code %d\n",
pkgid, rv);
+
+ zpm_import(&zpm, output, 0, hash);
+ zpm_note_add(&zpm, pkgid, NULL, hash, "package %s script failed with code %d", phase, rv);
+
fail = HARD;
}
zpm_close(&zpm);
return (fail == HARD || (required && fail)) ? EXIT_FAILURE : 0;
-
}