pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/libarchive Update to libarchive-2.5.1b:
details: https://anonhg.NetBSD.org/pkgsrc/rev/6c9e6e46db7a
branches: trunk
changeset: 541751:6c9e6e46db7a
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Apr 25 15:27:30 2008 +0000
description:
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:
archivers/libarchive/Makefile | 4 +-
archivers/libarchive/files/libarchive/archive_entry_link_resolver.c | 18 ++++++---
2 files changed, 13 insertions(+), 9 deletions(-)
diffs (63 lines):
diff -r eebb02e2603d -r 6c9e6e46db7a archivers/libarchive/Makefile
--- a/archivers/libarchive/Makefile Fri Apr 25 15:18:28 2008 +0000
+++ b/archivers/libarchive/Makefile Fri Apr 25 15:27:30 2008 +0000
@@ -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 -r eebb02e2603d -r 6c9e6e46db7a archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
--- a/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c Fri Apr 25 15:18:28 2008 +0000
+++ b/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c Fri Apr 25 15:27:30 2008 +0000
@@ -145,8 +145,10 @@
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_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 @@
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 @@
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);
}
Home |
Main Index |
Thread Index |
Old Index