diff options
-rw-r--r-- | doc/apk.8.scd | 5 | ||||
-rw-r--r-- | src/apk.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/apk.8.scd b/doc/apk.8.scd index f119313..2a096f7 100644 --- a/doc/apk.8.scd +++ b/doc/apk.8.scd @@ -120,6 +120,11 @@ The following options are available for all commands. *--force-broken-world* Continue even if _world_ cannot be satisfied. +*--force-no-chroot* + Disable chroot for scripts. This can be used for rootfs creation when + chroot is not available. Scripts running outside a chroot environment + may modify and damage the host system. + *--force-non-repository* Continue even if packages may be lost on reboot. This can happen when running in run-from-tmpfs mode, and installing non-repository package. @@ -62,6 +62,7 @@ static void version(struct apk_out *out, const char *prefix) OPT(OPT_GLOBAL_force, APK_OPT_SH("f") "force") \ OPT(OPT_GLOBAL_force_binary_stdout, "force-binary-stdout") \ OPT(OPT_GLOBAL_force_broken_world, "force-broken-world") \ + OPT(OPT_GLOBAL_force_no_chroot, "force-no-chroot") \ OPT(OPT_GLOBAL_force_non_repository, "force-non-repository") \ OPT(OPT_GLOBAL_force_old_apk, "force-old-apk") \ OPT(OPT_GLOBAL_force_overwrite, "force-overwrite") \ @@ -142,6 +143,9 @@ static int option_parse_global(void *ctx, struct apk_ctx *ac, int opt, const cha case OPT_GLOBAL_force_refresh: ac->force |= APK_FORCE_REFRESH; break; + case OPT_GLOBAL_force_no_chroot: + ac->flags |= APK_NO_CHROOT; + break; case OPT_GLOBAL_force_non_repository: ac->force |= APK_FORCE_NON_REPOSITORY; break; |