From 1531192cb9b697a8fc0042b295109bdf5cb52231 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Tue, 7 Jul 2009 10:03:30 +0300 Subject: add: ignore install failures on 'apk add --force' and use this option in initramfs, so we are likely to get an usable environment even if some packages from world are missing. fixes #50. --- src/add.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/add.c') diff --git a/src/add.c b/src/add.c index fbb95ff..b7b7edb 100644 --- a/src/add.c +++ b/src/add.c @@ -145,7 +145,8 @@ static int add_main(void *ctx, int argc, char **argv) r = apk_state_lock_dependency(state, &pkgs->item[i]); if (r != 0) { apk_error("Unable to install '%s'", pkgs->item[i].name->name); - goto err; + if (!(apk_flags & APK_FORCE)) + goto err; } if (!virtpkg) apk_deps_add(&db.world, &pkgs->item[i]); -- cgit v1.2.3-70-g09d2