aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-02-16 17:36:47 +0100
committerJo-Philipp Wich <jo@mein.io>2017-02-19 19:08:46 +0100
commitb65dc04712dfb8cc7bb9036c7c73b0cead6dd7c9 (patch)
tree6ebef4cc7d786698b57488d1d3d929dd7c398560 /package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch
parent84ceca514841dd6d4705dc27d2104ee0aa18b9e1 (diff)
downloadupstream-b65dc04712dfb8cc7bb9036c7c73b0cead6dd7c9.tar.gz
upstream-b65dc04712dfb8cc7bb9036c7c73b0cead6dd7c9.tar.bz2
upstream-b65dc04712dfb8cc7bb9036c7c73b0cead6dd7c9.zip
opkg: switch to own fork to improve memory usage
Switch to our own fork of opkg to significantly reduce the required amount of memory when updating lists or installing packages. Preliminary tests showed a usage drop of about 90% during these operations, from ~3.7MB with unmodified opkg to ~360KB with our custom fork. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch')
-rw-r--r--package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch73
1 files changed, 0 insertions, 73 deletions
diff --git a/package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch b/package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch
deleted file mode 100644
index 6abbd5df8e..0000000000
--- a/package/system/opkg/patches/280-call-prerm-and-postrm-scripts-on-upgrade.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From a8555d352d2851ee1482b74b57ba9eacfb354c18 Mon Sep 17 00:00:00 2001
-From: Peter Urbanec <peteru@urbanec.net>
-Date: Thu, 23 Oct 2014 01:05:35 +1100
-Subject: [PATCH] opkg_install: Call prerm and postrm scripts on package
- upgrade
-
-When upgrading a package from v1 to v2, run "v1-prerm upgrade v2" and
-"v1-postrm upgrade v2", similarly to what dpkg does.
-
-This patch fixes issue 104.
-
-Signed-off-by: Peter Urbanec <openembedded-devel@urbanec.net>
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
----
- libopkg/opkg_install.c | 40 ++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 38 insertions(+), 2 deletions(-)
-
---- a/libopkg/opkg_install.c
-+++ b/libopkg/opkg_install.c
-@@ -528,7 +528,25 @@ prerm_upgrade_old_pkg(pkg_t *pkg, pkg_t
- Error unwind, for both the above cases:
- old-postinst abort-upgrade new-version
- */
-- return 0;
-+ int err;
-+ char *script_args;
-+ char *new_version;
-+
-+ if (!old_pkg || !pkg)
-+ return 0;
-+
-+ new_version = pkg_version_str_alloc(pkg);
-+
-+ sprintf_alloc(&script_args, "upgrade %s", new_version);
-+ free(new_version);
-+ err = pkg_run_script(old_pkg, "prerm", script_args);
-+ free(script_args);
-+ if (err != 0) {
-+ opkg_msg(ERROR, "prerm script for package \"%s\" failed\n",
-+ old_pkg->name);
-+ return -1;
-+ }
-+ return 0;
- }
-
- static int
-@@ -925,7 +943,25 @@ postrm_upgrade_old_pkg(pkg_t *pkg, pkg_t
- new-postrm failed-upgrade old-version
- Error unwind, for both cases:
- old-preinst abort-upgrade new-version */
-- return 0;
-+ int err;
-+ char *script_args;
-+ char *new_version;
-+
-+ if (!old_pkg || !pkg)
-+ return 0;
-+
-+ new_version = pkg_version_str_alloc(pkg);
-+
-+ sprintf_alloc(&script_args, "upgrade %s", new_version);
-+ free(new_version);
-+ err = pkg_run_script(old_pkg, "postrm", script_args);
-+ free(script_args);
-+ if (err != 0) {
-+ opkg_msg(ERROR, "postrm script for package \"%s\" failed\n",
-+ old_pkg->name);
-+ return -1;
-+ }
-+ return 0;
- }
-
- static int