summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-11 23:14:14 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2010-01-11 23:14:14 (EST)
commite0108bbf815b1806c96e3cbdc2a2dc162f7c1fe1 (patch)
tree3a996023aa7b41c8b75d62b665fe4fc7a40117c1 /libopkg
parent396c9ed8f22850bb2c4065181fcc1875a20fbf12 (diff)
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
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/pkg.c7
1 files changed, 6 insertions, 1 deletions
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);