#include <sys/types.h>
#include <sqlite3.h>
+#include <lib/jsw/jsw_atree.h>
#define ZPM_HASH_STRLEN 64
struct zpm_package {
struct zpm *zpm;
- struct jsw_hash *ht;
+ struct jsw_hash_t *ht;
/* char pointers are just pointers into the hash table */
/* integers/times and such are passed through atoi */
};
int zpm_parse_package(char *pstr, char *name, char *ver, int *rel);
-char *zpm_findpkg(struct zpm *zpm, char *pkgstr);
+char *zpm_findpkg(struct zpm *zpm, char *pkgstr, char *where);
+char *zpm_findlib(struct zpm *zpm, char *soname, char *where);
+int zpm_libraries_needed(struct zpm *zpm, char *pkgid, jsw_atree_t *list);
int zpm_quote(char *value, char *dest, size_t n);
struct zpm_file {
int zpm_foreach_path(struct zpm *zpm, char *pkgid, char *where,
int (*callback)(void *f, int ncols, char **vals, char **cols),
void *data, char **errmsg);
-
+int zpm_foreach_package(struct zpm *zpm, char *where,
+int (*callback)(void *cbdata, int ncols, char **vals, char **cols),
+void *data, char **errmsg);
int zpm_script_hash(struct zpm *zpm, char *pkgstr, char *phase, char *hash);
+int zpm_script_set(struct zpm *zpm, char *pkgstr, char *phase, char *hash);
+int zpm_foreach_script(struct zpm *zpm, char *pkgstr, char *stage, void *cbd,
+ int (*cb)(void *ud, const char *pkg, const char *stage, const char *hash));
+
int zpm_package_hash(struct zpm *zpm, char *pkgid, char *hash);
int zpm_package_sethash(struct zpm *zpm, char *pkgid, char *hash);