From b65dc04712dfb8cc7bb9036c7c73b0cead6dd7c9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 16 Feb 2017 17:36:47 +0100 Subject: 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 --- .../040-wrap-descriptions-only-on-ttys.patch | 31 ---------------------- 1 file changed, 31 deletions(-) delete mode 100644 package/system/opkg/patches/040-wrap-descriptions-only-on-ttys.patch (limited to 'package/system/opkg/patches/040-wrap-descriptions-only-on-ttys.patch') diff --git a/package/system/opkg/patches/040-wrap-descriptions-only-on-ttys.patch b/package/system/opkg/patches/040-wrap-descriptions-only-on-ttys.patch deleted file mode 100644 index 9540668..0000000 --- a/package/system/opkg/patches/040-wrap-descriptions-only-on-ttys.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/libopkg/pkg_parse.c -+++ b/libopkg/pkg_parse.c -@@ -20,6 +20,7 @@ - - #include - #include -+#include - - #include "pkg.h" - #include "opkg_utils.h" -@@ -239,10 +240,16 @@ pkg_parse_line(void *ptr, const char *li - - case ' ': - if ((mask & PFM_DESCRIPTION) && reading_description) { -- pkg->description = xrealloc(pkg->description, -- strlen(pkg->description) -- + 1 + strlen(line) + 1); -- strcat(pkg->description, "\n"); -+ if (isatty(1)) { -+ pkg->description = xrealloc(pkg->description, -+ strlen(pkg->description) -+ + 1 + strlen(line) + 1); -+ strcat(pkg->description, "\n"); -+ } else { -+ pkg->description = xrealloc(pkg->description, -+ strlen(pkg->description) -+ + 1 + strlen(line)); -+ } - strcat(pkg->description, (line)); - goto dont_reset_flags; - } else if ((mask & PFM_CONFFILES) && reading_conffiles) { -- cgit v1.1