summaryrefslogtreecommitdiff
path: root/src/apk_package.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-10-29 05:18:21 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-10-29 05:18:21 +0300
commit500f8d4a7d7b17871647392e79e4c7a17c210534 (patch)
tree47d4b1cd04e374d88e26e352eeac9f51da083451 /src/apk_package.h
parente682e6596c101d634b3780a98773c8433b3baadb (diff)
downloadapk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.tar.gz
apk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.tar.bz2
apk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.tar.xz
apk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.zip
solver, db: implement repository pinning
Improves /etc/apk/repositories format so you can say: http://nl.alpinelinux.org/alpine/v2.3/main @edge http://nl.alpinelinux.org/alpine/edge/main @testing http://nl.alpinelinux.org/alpine/edge/testing After which you can pin dependencies to these tags using: apk add stableapp newapp@edge bleedingapp@testing Apk will now by default only use the untagged repositories, but adding a tag to specific dependency: 1. will prefer that tag for the name 2. allowing pulling in dependencies from that tag (though, it prefers untagged packages to satisfy deps if possible) fixes #575
Diffstat (limited to 'src/apk_package.h')
-rw-r--r--src/apk_package.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/apk_package.h b/src/apk_package.h
index c68fef7..a241a67 100644
--- a/src/apk_package.h
+++ b/src/apk_package.h
@@ -59,6 +59,7 @@ struct apk_sign_ctx {
struct apk_dependency {
struct apk_name *name;
apk_blob_t *version;
+ unsigned short repository_tag;
unsigned optional : 1;
unsigned result_mask : 3;
};
@@ -120,12 +121,13 @@ void apk_dep_from_pkg(struct apk_dependency *dep, struct apk_database *db,
struct apk_package *pkg);
int apk_dep_is_satisfied(struct apk_dependency *dep, struct apk_package *pkg);
-void apk_blob_push_dep(apk_blob_t *to, struct apk_dependency *dep);
-void apk_blob_push_deps(apk_blob_t *to, struct apk_dependency_array *deps);
+void apk_blob_push_dep(apk_blob_t *to, struct apk_database *, struct apk_dependency *dep);
+void apk_blob_push_deps(apk_blob_t *to, struct apk_database *, struct apk_dependency_array *deps);
void apk_blob_pull_dep(apk_blob_t *from, struct apk_database *, struct apk_dependency *);
void apk_blob_pull_deps(apk_blob_t *from, struct apk_database *, struct apk_dependency_array **);
-int apk_deps_write(struct apk_dependency_array *deps, struct apk_ostream *os);
+int apk_deps_write(struct apk_database *db, struct apk_dependency_array *deps,
+ struct apk_ostream *os);
int apk_deps_add(struct apk_dependency_array **depends,
struct apk_dependency *dep);