From 545a915fafbecbda0e278dfcc881984bd7a8b19b Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Fri, 28 Nov 2008 13:15:06 +0200 Subject: db: rework 'files' to 'installed' Make the db of installed packages more similar to index file and reuse the code. Also rename the database file. --- src/apk_package.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/apk_package.h') diff --git a/src/apk_package.h b/src/apk_package.h index ea8ef24..f36eb6b 100644 --- a/src/apk_package.h +++ b/src/apk_package.h @@ -72,10 +72,14 @@ int apk_deps_format(char *buf, int size, struct apk_dependency_array *depends); int apk_script_type(const char *name); +struct apk_package *apk_pkg_new(void); struct apk_package *apk_pkg_read(struct apk_database *db, const char *name); void apk_pkg_free(struct apk_package *pkg); +int apk_pkg_add_info(struct apk_database *db, struct apk_package *pkg, + char field, apk_blob_t value); int apk_pkg_get_state(struct apk_package *pkg); +void apk_pkg_set_state(struct apk_database *db, struct apk_package *pkg, int state); int apk_pkg_add_script(struct apk_package *pkg, struct apk_istream *is, unsigned int type, unsigned int size); int apk_pkg_run_script(struct apk_package *pkg, int root_fd, -- cgit v1.2.3-70-g09d2