From e0108bbf815b1806c96e3cbdc2a2dc162f7c1fe1 Mon Sep 17 00:00:00 2001 From: graham.gower Date: Mon, 11 Jan 2010 23:14:14 -0500 Subject: 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 --- (limited to 'libopkg') 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); -- cgit v0.9.1