summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_install/files/info/perform.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/pkg_install/files/info/perform.c')
-rw-r--r--pkgtools/pkg_install/files/info/perform.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/info/perform.c b/pkgtools/pkg_install/files/info/perform.c
index de1ac33add8..cdfe5ad6c05 100644
--- a/pkgtools/pkg_install/files/info/perform.c
+++ b/pkgtools/pkg_install/files/info/perform.c
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.55 2009/03/09 19:58:45 joerg Exp $ */
+/* $NetBSD: perform.c,v 1.56 2009/04/22 19:18:06 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -13,7 +13,7 @@
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
-__RCSID("$NetBSD: perform.c,v 1.55 2009/03/09 19:58:45 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.56 2009/04/22 19:18:06 joerg Exp $");
/*-
* Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
@@ -183,8 +183,10 @@ read_meta_data_from_archive(struct archive *archive,
meta = xcalloc(1, sizeof(*meta));
last_descr = 0;
- if (entry != NULL)
+ if (entry != NULL) {
+ r = ARCHIVE_OK;
goto has_entry;
+ }
while ((r = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) {
has_entry:
@@ -228,13 +230,13 @@ has_entry:
if (descr->required_file)
--found_required;
}
- if (found_required != 0) {
+
+ meta->is_installed = 0;
+ if (found_required != 0 && r != ARCHIVE_OK && r != ARCHIVE_EOF) {
free_pkg_meta(meta);
meta = NULL;
}
- meta->is_installed = 0;
-
return meta;
}
#endif