summaryrefslogtreecommitdiff
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-11-06 11:31:03 +0200
committerTimo Teras <timo.teras@iki.fi>2009-11-06 11:31:03 +0200
commita93a35eecaf580d97f6a451d7e951be0ff18372c (patch)
treecec5984f85821ad8aff5cfe317e98c0e5f4ab36e /src/apk.c
parent44ac0b06af20bd32010502a10d8bb7752215c627 (diff)
downloadapk-tools-a93a35eecaf580d97f6a451d7e951be0ff18372c.tar.gz
apk-tools-a93a35eecaf580d97f6a451d7e951be0ff18372c.tar.bz2
apk-tools-a93a35eecaf580d97f6a451d7e951be0ff18372c.tar.xz
apk-tools-a93a35eecaf580d97f6a451d7e951be0ff18372c.zip
apk: add --never-overwrite flag (ref #197)
to never ever overwrite a while in the filesystem the user knows about. it gives the impression of extraction succeeding even though nothing was done. this is inteded to be used only for bootstrapping with overlay.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/apk.c b/src/apk.c
index 6c4acd7..eff31ac 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -57,6 +57,7 @@ static struct apk_option generic_options[] = {
{ 0x108, "repositories-file", "Override repositories file",
required_argument, "REPOFILE" },
{ 0x109, "no-network", "Do not use network (cache is still used)" },
+ { 0x110, "never-overwrite", "Never overwrite existing files" },
};
const char *apk_error_str(int error)
@@ -384,6 +385,9 @@ int main(int argc, char **argv)
case 0x109:
apk_flags |= APK_NO_NETWORK;
break;
+ case 0x110:
+ apk_flags |= APK_NEVER_OVERWRITE;
+ break;
default:
if (applet == NULL || applet->parse == NULL ||
applet->parse(ctx, &dbopts, r,