From: graham.gower Date: Tue, 12 Jan 2010 04:14:14 +0000 (+0000) Subject: Print an error in the case of a broken control.tar.gz file within the archive. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e0108bbf815b1806c96e3cbdc2a2dc162f7c1fe1;p=oweals%2Fopkg-lede.git 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 --- 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);