#include <limits.h>
#include <stdarg.h>
#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
-#include <sqlite3.h>
-#include <lib/jsw/jsw_atree.h>
+#include "sqlite3.h"
+#include "lib/jsw/jsw_atree.h"
#define ZPM_HASH_STRLEN 64
struct zpm_package *current_package;
};
+struct zpm_stat {
+ struct stat st;
+ int configuration;
+ char hash[65]; /* length + room for a nul byte */
+ char diskhash[65]; /* hash of actual file on disk */
+ char *target; /* malloced link target */
+};
+
struct zpm_dependency {
char minpkg[ZPM_PACKAGE_ID_MAX+1];
char maxpkg[ZPM_PACKAGE_ID_MAX+1];
/* get file information */
int zpm_stat(struct zpm *z, struct zpm_file *f, int n);
-/* will also set the package context to the new package */
-int zpm_newpkg(struct zpm *z, char *base, char *version, int release);
+//int zpm_newpkg(struct zpm *z, char *base, char *version, int release);
+int zpm_create_package(struct zpm *zpm, char *name, char *ver, int rel);
+int zpm_create_pkgid(struct zpm *zpm, char *pkgstr);
/* transactions */
int zpm_begin(struct zpm *z);