From e0108bbf815b1806c96e3cbdc2a2dc162f7c1fe1 Mon Sep 17 00:00:00 2001 From: "graham.gower" Date: Tue, 12 Jan 2010 04:14:14 +0000 Subject: [PATCH] Print an error in the case of a broken control.tar.gz file within the archive. git-svn-id: http://opkg.googlecode.com/svn/trunk@516 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- libopkg/pkg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libopkg/pkg.c b/libopkg/pkg.c index c5a3336..467dcef 100644 --- a/libopkg/pkg.c +++ b/libopkg/pkg.c @@ -309,8 +309,13 @@ pkg_init_from_file(pkg_t *pkg, const char *filename) rewind(control_file); - if (pkg_parse_from_stream(pkg, control_file, 0)) + if ((err = pkg_parse_from_stream(pkg, control_file, 0))) { + if (err == 1) { + opkg_msg(ERROR, "Malformed package file %s.\n", + filename); + } err = -1; + } err2: fclose(control_file); -- 2.25.1