summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-11-23 19:01:35 (EST)
committer graham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-11-23 19:01:35 (EST)
commit76282e2441864414fc7548ca5685de5d4dc29c6c (patch)
tree649be8c34dcfe13cd11ac21d8b17463044e32665 /src
parent970666583189a1f2712c1baa0b8b6a40a9b71b75 (diff)
Abort package removal if the prerm script of a package returns non zero.
This can be overridden with --force-remove. Also, improve propagation of errors up the call stack for related errors. From Sergey 'Jin' Bostandzhyan. git-svn-id: http://opkg.googlecode.com/svn/trunk@587 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'src')
-rw-r--r--src/opkg-cl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/opkg-cl.c b/src/opkg-cl.c
index bf123cd..5b72050 100644
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
@@ -40,6 +40,7 @@ enum {
ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES,
ARGS_OPT_FORCE_SPACE,
ARGS_OPT_FORCE_POSTINSTALL,
+ ARGS_OPT_FORCE_REMOVE,
ARGS_OPT_ADD_ARCH,
ARGS_OPT_ADD_DEST,
ARGS_OPT_NOACTION,
@@ -79,6 +80,8 @@ static struct option long_options[] = {
ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES},
{"force-postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL},
{"force_postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL},
+ {"force-remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
+ {"force_remove", 0, 0, ARGS_OPT_FORCE_REMOVE},
{"noaction", 0, 0, ARGS_OPT_NOACTION},
{"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
{"nodeps", 0, 0, ARGS_OPT_NODEPS},
@@ -166,6 +169,9 @@ args_parse(int argc, char *argv[])
case ARGS_OPT_FORCE_POSTINSTALL:
conf->force_postinstall = 1;
break;
+ case ARGS_OPT_FORCE_REMOVE:
+ conf->force_remove = 1;
+ break;
case ARGS_OPT_NODEPS:
conf->nodeps = 1;
break;
@@ -270,6 +276,7 @@ usage()
printf("\t--force-downgrade Allow opkg to downgrade packages\n");
printf("\t--force-space Disable free space checks\n");
printf("\t--force-postinstall Run postinstall scripts even in offline mode\n");
+ printf("\t--force-remove Remove package even if prerm script fails\n");
printf("\t--noaction No action -- test only\n");
printf("\t--download-only No action -- download only\n");
printf("\t--nodeps Do not follow dependencies\n");