summaryrefslogtreecommitdiff
path: root/src/apk_defines.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-01-03 15:17:11 +0200
committerTimo Teräs <timo.teras@iki.fi>2018-01-03 16:00:38 +0200
commit039ff3bd466819909a5295a43e40947a9e0b6c16 (patch)
tree1f22b1a16dd752e48142a0c5aff0697fb100ea78 /src/apk_defines.h
parentf90af35e9c563bd4f865d8d47a7ae357191494db (diff)
downloadapk-tools-039ff3bd466819909a5295a43e40947a9e0b6c16.tar.gz
apk-tools-039ff3bd466819909a5295a43e40947a9e0b6c16.tar.bz2
apk-tools-039ff3bd466819909a5295a43e40947a9e0b6c16.tar.xz
apk-tools-039ff3bd466819909a5295a43e40947a9e0b6c16.zip
split --force to several --force-[type] options
This unloads --force as several of the things are really not wanted together. E.g. --force-refresh is a lot different from --force-broken-world and doing --force to get the other might introduce unwanted behaviour. --force is still kept for backwards compatibility and it enables most things --force was used for.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r--src/apk_defines.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index 08a3801..7e79135 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -60,11 +60,10 @@ static inline int IS_ERR_OR_NULL(const void *ptr) { return IS_ERR(ptr) || !ptr;
#endif
extern int apk_verbosity;
-extern unsigned int apk_flags;
+extern unsigned int apk_flags, apk_force;
extern const char *apk_arch;
extern char **apk_argv;
-#define APK_FORCE 0x0001
#define APK_SIMULATE 0x0002
#define APK_CLEAN_PROTECTED 0x0004
#define APK_PROGRESS 0x0008
@@ -79,6 +78,13 @@ extern char **apk_argv;
#define APK_NO_CACHE 0x8000
#define APK_NO_COMMIT_HOOKS 0x00010000
+#define APK_FORCE_OVERWRITE BIT(0)
+#define APK_FORCE_OLD_APK BIT(1)
+#define APK_FORCE_BROKEN_WORLD BIT(2)
+#define APK_FORCE_REFRESH BIT(3)
+#define APK_FORCE_NON_REPOSITORY BIT(4)
+#define APK_FORCE_BINARY_STDOUT BIT(5)
+
/* default architecture for APK packages. */
#if defined(__x86_64__)
#define APK_DEFAULT_ARCH "x86_64"