summaryrefslogtreecommitdiff
path: root/archivers/libarchive
diff options
context:
space:
mode:
authorjoerg <joerg>2008-04-25 15:27:30 +0000
committerjoerg <joerg>2008-04-25 15:27:30 +0000
commit18c02260df7f3c286810464dc8e6ae7515be3c8e (patch)
tree240b35b1cd45ea97587e68ae5b5688902913e292 /archivers/libarchive
parent0a2f09d8c820cc0c1140a6f3373fa40db6ce29bd (diff)
downloadpkgsrc-18c02260df7f3c286810464dc8e6ae7515be3c8e.tar.gz
Update to libarchive-2.5.1b:
- Simplify character-translation logic. pkgsrc: Fix a bug in the linkresolver for tar format. When linkresolver is done, the entry belongs to the caller, so don't keep a reference to it and use the local copy for inode comparision.
Diffstat (limited to 'archivers/libarchive')
-rw-r--r--archivers/libarchive/Makefile4
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry_link_resolver.c18
2 files changed, 13 insertions, 9 deletions
diff --git a/archivers/libarchive/Makefile b/archivers/libarchive/Makefile
index 324d3a54e5f..d202113afa5 100644
--- a/archivers/libarchive/Makefile
+++ b/archivers/libarchive/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.24 2008/03/29 14:41:01 joerg Exp $
+# $NetBSD: Makefile,v 1.25 2008/04/25 15:27:30 joerg Exp $
#
-DISTNAME= libarchive-2.5.0b
+DISTNAME= libarchive-2.5.1b
CATEGORIES= archivers
MASTER_SITES= http://people.freebsd.org/~kientzle/libarchive/src/
DISTFILES= # empty
diff --git a/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c b/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
index 0df9ff92e68..4d8582141e9 100644
--- a/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
+++ b/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
@@ -145,8 +145,10 @@ archive_entry_linkresolver_free(struct archive_entry_linkresolver *res)
struct links_entry *le;
if (res->buckets != NULL) {
- while ((le = next_entry(res)) != NULL)
- archive_entry_free(le->entry);
+ while ((le = next_entry(res)) != NULL) {
+ if (le->entry != NULL)
+ archive_entry_free(le->entry);
+ }
free(res->buckets);
res->buckets = NULL;
}
@@ -180,8 +182,10 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
archive_entry_set_size(*e, 0);
archive_entry_set_hardlink(*e,
archive_entry_pathname(le->canonical));
- } else
- insert_entry(res, *e);
+ } else {
+ le = insert_entry(res, *e);
+ le->entry = NULL;
+ }
return;
case ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO:
/* This one is trivial. */
@@ -248,8 +252,8 @@ find_entry(struct archive_entry_linkresolver *res,
bucket = hash % res->number_buckets;
for (le = res->buckets[bucket]; le != NULL; le = le->next) {
if (le->hash == hash
- && dev == archive_entry_dev(le->entry)
- && ino == archive_entry_ino(le->entry)) {
+ && dev == archive_entry_dev(le->canonical)
+ && ino == archive_entry_ino(le->canonical)) {
/*
* Decrement link count each time and release
* the entry if it hits zero. This saves
@@ -337,8 +341,8 @@ insert_entry(struct archive_entry_linkresolver *res,
le->previous = NULL;
res->buckets[bucket] = le;
le->hash = hash;
- le->links = archive_entry_nlink(entry) - 1;
le->canonical = archive_entry_clone(entry);
+ le->links = archive_entry_nlink(le->canonical) - 1;
return (le);
}