summaryrefslogtreecommitdiff
path: root/src/apk_package.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-10-18 18:11:26 -0400
committerTimo Teräs <timo.teras@iki.fi>2011-10-18 18:11:26 -0400
commita787038dbe643a7169a4b3610e104ac94b175ed0 (patch)
tree93e0e6629d805cdef6fa5833100ed0366225b019 /src/apk_package.h
parentafd854a3e2cf20b3f35c5503c9df9589f482dc74 (diff)
downloadapk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.tar.gz
apk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.tar.bz2
apk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.tar.xz
apk-tools-a787038dbe643a7169a4b3610e104ac94b175ed0.zip
pkg, info: remember installed packages "replaces"
"replaces" is now turned to a full dependency type list, so you can make package overwrite files only certain versions of the package (though, we should probably take this into account already at solution calculation phase). Also make 'info --replaces' print the "replaces" of the package. This is in preparation for the policy package support, which still requires "replacement priority" field to decide which packages' files get the preference.
Diffstat (limited to 'src/apk_package.h')
-rw-r--r--src/apk_package.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/apk_package.h b/src/apk_package.h
index b6bcffd..f58954f 100644
--- a/src/apk_package.h
+++ b/src/apk_package.h
@@ -74,6 +74,7 @@ struct apk_installed_package {
apk_blob_t script[APK_SCRIPT_MAX];
struct apk_string_array *triggers;
struct apk_string_array *pending_triggers;
+ struct apk_dependency_array *replaces;
};
#define APK_PKG_UNINSTALLABLE ((char*) -1)
@@ -115,22 +116,21 @@ int apk_sign_ctx_verify_tar(void *ctx, const struct apk_file_info *fi,
struct apk_istream *is);
int apk_sign_ctx_mpart_cb(void *ctx, int part, apk_blob_t blob);
-int apk_dep_from_blob(struct apk_dependency *dep, struct apk_database *db,
- apk_blob_t blob);
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_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_add(struct apk_dependency_array **depends,
struct apk_dependency *dep);
void apk_deps_del(struct apk_dependency_array **deps,
struct apk_name *name);
-void apk_deps_parse(struct apk_database *db,
- struct apk_dependency_array **depends,
- apk_blob_t blob);
-
-int apk_deps_write(struct apk_dependency_array *deps, struct apk_ostream *os);
int apk_script_type(const char *name);
void apk_pkg_format_plain(struct apk_package *pkg, apk_blob_t to);