diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-05-19 08:49:55 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-05-19 08:49:55 +0300 |
commit | 2c4f6bb5031636ccb87c340efd0ad6d24912cab0 (patch) | |
tree | 41a2c6e0c7714479a0b315311d336f550a7ac672 /src/del.c | |
parent | 1e36692a8aee88564b19e6855febd91b4feea5eb (diff) | |
download | apk-tools-2c4f6bb5031636ccb87c340efd0ad6d24912cab0.tar.gz apk-tools-2c4f6bb5031636ccb87c340efd0ad6d24912cab0.tar.bz2 apk-tools-2c4f6bb5031636ccb87c340efd0ad6d24912cab0.tar.xz apk-tools-2c4f6bb5031636ccb87c340efd0ad6d24912cab0.zip |
del: allow deletion of world dependency when it is not installed
this happens e.g. after tmpfs boot when not all packages where
available: the dependency is in world, but not installed.
Diffstat (limited to 'src/del.c')
-rw-r--r-- | src/del.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -95,11 +95,14 @@ static void delete_pkg(struct apk_package *pkg0, struct apk_dependency *dep0, static void delete_name(struct apk_database *db, const char *match, struct apk_name *name, void *pctx) { + struct del_ctx *ctx = (struct del_ctx *) pctx; struct apk_package *pkg; pkg = apk_pkg_get_installed(name); if (pkg != NULL) delete_pkg(pkg, NULL, NULL, pctx); + else + apk_deps_del(&ctx->world, name); } static int del_main(void *pctx, struct apk_database *db, struct apk_string_array *args) |