summaryrefslogtreecommitdiffstats
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-04-15 13:19:36 +0300
committerTimo Teras <timo.teras@iki.fi>2009-04-15 13:20:35 +0300
commita9b6d18f7f979cf08f6f48f1f4c12d49689f51b9 (patch)
tree8923ea75d58b121b65842e138fcfeee76d532b30 /src/apk.c
parent33da51c596237e8e813d6c18e064939e4ebef445 (diff)
downloadapk-tools-a9b6d18f7f979cf08f6f48f1f4c12d49689f51b9.tar.bz2
apk-tools-a9b6d18f7f979cf08f6f48f1f4c12d49689f51b9.tar.xz
state: make package deletion safer
Refuse to delete explicitly specified top-level packages unless --force is specified.
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/apk.c b/src/apk.c
index 21e4359..bbee041 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -117,9 +117,9 @@ static struct option generic_options[32] = {
{ "quiet", no_argument, NULL, 'q' },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
+ { "force", no_argument, NULL, 'f' },
{ "progress", no_argument, NULL, 0x101 },
{ "clean-protected", no_argument, NULL, 0x102 },
- { "force", no_argument, NULL, 0x103 },
{ "simulate", no_argument, NULL, 0x104 },
};
@@ -181,15 +181,15 @@ int main(int argc, char **argv)
break;
case 'V':
return version();
+ case 'f':
+ apk_flags |= APK_FORCE;
+ break;
case 0x101:
apk_flags |= APK_PROGRESS;
break;
case 0x102:
apk_flags |= APK_CLEAN_PROTECTED;
break;
- case 0x103:
- apk_flags |= APK_FORCE;
- break;
case 0x104:
apk_flags |= APK_SIMULATE;
break;