aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-10-14 08:09:58 +0000
committerSteven Barth <steven@midlink.org>2013-10-14 08:09:58 +0000
commite9ae348a48c1a22a149a4b97786848acdfa0e7e3 (patch)
treeb303211b99e54b9d737e0490e9ad1ac418b14970
parent77517a6a27955ad475c36219f1b91fc9f612ee5c (diff)
downloadupstream-e9ae348a48c1a22a149a4b97786848acdfa0e7e3.tar.gz
upstream-e9ae348a48c1a22a149a4b97786848acdfa0e7e3.tar.bz2
upstream-e9ae348a48c1a22a149a4b97786848acdfa0e7e3.zip
opkg: ignore empty fields in package lists
This is to work around issues with package list generators creating empty fields in some environments. Based on a patch by Paul Selkrik <pselkrik@isc.org> Signed-off-by: Steven Barth <steven@midlink.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38390 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/system/opkg/Makefile2
-rw-r--r--package/system/opkg/patches/080-suppress-blank-package-fields.patch16
2 files changed, 17 insertions, 1 deletions
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
index 624f2edba2..0669ddf685 100644
--- a/package/system/opkg/Makefile
+++ b/package/system/opkg/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/version.mk
PKG_NAME:=opkg
PKG_REV:=618
PKG_VERSION:=$(PKG_REV)
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_VERSION:=$(PKG_REV)
diff --git a/package/system/opkg/patches/080-suppress-blank-package-fields.patch b/package/system/opkg/patches/080-suppress-blank-package-fields.patch
new file mode 100644
index 0000000000..976b97d7d2
--- /dev/null
+++ b/package/system/opkg/patches/080-suppress-blank-package-fields.patch
@@ -0,0 +1,16 @@
+--- a/libopkg/parse_util.c
++++ b/libopkg/parse_util.c
+@@ -35,7 +35,12 @@ is_field(const char *type, const char *l
+ char *
+ parse_simple(const char *type, const char *line)
+ {
+- return trim_xstrdup(line + strlen(type) + 1);
++ char *field = trim_xstrdup(line + strlen(type) + 1);
++ if (strlen(field) == 0) {
++ free(field);
++ return NULL;
++ }
++ return field;
+ }
+
+ /*