aboutsummaryrefslogtreecommitdiffstats
path: root/package/opkg/patches/014-force-postinstall.patch
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-09-12 21:16:02 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-09-12 21:16:02 +0000
commitf10bd899e621ecf56c0f5d3c55680608eab0c2fa (patch)
tree566c25e3ef4f437ffdb4bd6257e605c798b2b584 /package/opkg/patches/014-force-postinstall.patch
parent67dbab4dd0ccfea6402f8edc434e961c3804e9aa (diff)
downloadupstream-f10bd899e621ecf56c0f5d3c55680608eab0c2fa.tar.gz
upstream-f10bd899e621ecf56c0f5d3c55680608eab0c2fa.tar.bz2
upstream-f10bd899e621ecf56c0f5d3c55680608eab0c2fa.zip
[package] opkg:
- implement --add-dest and --add-arch commandline options, this allows to run entirely without configuration - tweak default config location patch to not require a config in offline root mode - rename --force-run-hooks option to --force-postinstall, its a more appropriate name - utilize new opkg commandline options in package-ipkg.mk and remove config file generation git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23032 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/opkg/patches/014-force-postinstall.patch')
-rw-r--r--package/opkg/patches/014-force-postinstall.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/package/opkg/patches/014-force-postinstall.patch b/package/opkg/patches/014-force-postinstall.patch
new file mode 100644
index 0000000000..8634561f4a
--- /dev/null
+++ b/package/opkg/patches/014-force-postinstall.patch
@@ -0,0 +1,68 @@
+--- a/libopkg/opkg_conf.c
++++ b/libopkg/opkg_conf.c
+@@ -54,6 +54,7 @@ opkg_option_t options[] = {
+ { "force_reinstall", OPKG_OPT_TYPE_BOOL, &_conf.force_reinstall },
+ { "force_space", OPKG_OPT_TYPE_BOOL, &_conf.force_space },
+ { "check_signature", OPKG_OPT_TYPE_BOOL, &_conf.check_signature },
++ { "force_postinstall", OPKG_OPT_TYPE_BOOL, &_conf.force_postinstall },
+ { "ftp_proxy", OPKG_OPT_TYPE_STRING, &_conf.ftp_proxy },
+ { "http_proxy", OPKG_OPT_TYPE_STRING, &_conf.http_proxy },
+ { "no_proxy", OPKG_OPT_TYPE_STRING, &_conf.no_proxy },
+--- a/libopkg/opkg_conf.h
++++ b/libopkg/opkg_conf.h
+@@ -73,6 +73,7 @@ struct opkg_conf
+ int force_space;
+ int force_removal_of_dependent_packages;
+ int force_removal_of_essential_packages;
++ int force_postinstall;
+ int check_signature;
+ int nodeps; /* do not follow dependencies */
+ char *offline_root;
+--- a/libopkg/pkg.c
++++ b/libopkg/pkg.c
+@@ -1249,7 +1249,7 @@ pkg_run_script(pkg_t *pkg, const char *s
+
+ /* XXX: FEATURE: When conf->offline_root is set, we should run the
+ maintainer script within a chroot environment. */
+- if (conf->offline_root) {
++ if (conf->offline_root && !conf->force_postinstall) {
+ opkg_msg(INFO, "Offline root mode: not running %s.%s.\n",
+ pkg->name, script);
+ return 0;
+--- a/src/opkg-cl.c
++++ b/src/opkg-cl.c
+@@ -39,6 +39,7 @@ enum {
+ ARGS_OPT_FORCE_REMOVAL_OF_DEPENDENT_PACKAGES,
+ ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES,
+ ARGS_OPT_FORCE_SPACE,
++ ARGS_OPT_FORCE_POSTINSTALL,
+ ARGS_OPT_NOACTION,
+ ARGS_OPT_DOWNLOAD_ONLY,
+ ARGS_OPT_NODEPS,
+@@ -74,6 +75,8 @@ static struct option long_options[] = {
+ ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES},
+ {"force_removal_of_essential_packages", 0, 0,
+ ARGS_OPT_FORCE_REMOVAL_OF_ESSENTIAL_PACKAGES},
++ {"force-postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL},
++ {"force_postinstall", 0, 0, ARGS_OPT_FORCE_POSTINSTALL},
+ {"noaction", 0, 0, ARGS_OPT_NOACTION},
+ {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY},
+ {"nodeps", 0, 0, ARGS_OPT_NODEPS},
+@@ -153,6 +156,9 @@ args_parse(int argc, char *argv[])
+ case ARGS_OPT_FORCE_SPACE:
+ conf->force_space = 1;
+ break;
++ case ARGS_OPT_FORCE_POSTINSTALL:
++ conf->force_postinstall = 1;
++ break;
+ case ARGS_OPT_NODEPS:
+ conf->nodeps = 1;
+ break;
+@@ -242,6 +248,7 @@ usage()
+ printf("\t--force-overwrite Overwrite files from other package(s)\n");
+ 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--noaction No action -- test only\n");
+ printf("\t--download-only No action -- download only\n");
+ printf("\t--nodeps Do not follow dependencies\n");