aboutsummaryrefslogtreecommitdiffstats
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-24 15:50:39 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-24 16:31:40 +0200
commit99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3 (patch)
tree37eb5b28d99600d3b310e502218dbc8167adf986 /src/apk_database.h
parent97d44b5a002b61c7b95303bb8616f1caa6556bca (diff)
downloadaports-99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3.tar.bz2
aports-99145e2c0dc0b5b3b5a2a72fb1bff140d1f583f3.tar.xz
all: introduce apk_provides and use it in apk_name
in preparation for provides support. implements also some dependency satisfaction helper routines. ref #574.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index c9e1634ff2..2dbf043ac8 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -78,6 +78,15 @@ struct apk_db_dir_instance {
gid_t gid;
};
+#define PROVIDER_FMT "%s-"BLOB_FMT
+#define PROVIDER_PRINTF(p) (p)->pkg->name->name, BLOB_PRINTF(*(p)->version)
+
+struct apk_provider {
+ struct apk_package *pkg;
+ apk_blob_t *version;
+};
+APK_ARRAY(apk_provider_array, struct apk_provider);
+
struct apk_name {
apk_hash_node hash_node;
union {
@@ -85,7 +94,7 @@ struct apk_name {
void *state_ptr;
};
char *name;
- struct apk_package_array *pkgs;
+ struct apk_provider_array *providers;
struct apk_name_array *rdepends;
struct apk_name_array *rinstall_if;
};