PERFORCE change 137860 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Mar 16 20:48:59 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=137860
Change 137860 by marcel at marcel_xcllnt on 2008/03/16 20:48:13
IFC @137859
Affected files ...
.. //depot/projects/bdb/ObsoleteFiles.inc#3 integrate
.. //depot/projects/bdb/bin/Makefile#2 integrate
.. //depot/projects/bdb/bin/uuidgen/Makefile#2 integrate
.. //depot/projects/bdb/lib/libarchive/Makefile#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive.h.in#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_entry.3#3 integrate
.. //depot/projects/bdb/lib/libarchive/archive_entry.c#3 integrate
.. //depot/projects/bdb/lib/libarchive/archive_entry.h#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_read_private.h#3 integrate
.. //depot/projects/bdb/lib/libarchive/archive_read_support_format_mtree.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_read_support_format_tar.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_string.h#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_string_sprintf.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_util.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_disk.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_private.h#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_set_compression_compress.c#1 branch
.. //depot/projects/bdb/lib/libarchive/archive_write_set_format_ar.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_set_format_cpio.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_set_format_cpio_newc.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_set_format_pax.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_set_format_shar.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/archive_write_set_format_ustar.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/config_freebsd.h#2 integrate
.. //depot/projects/bdb/lib/libarchive/test/.cvsignore#1 branch
.. //depot/projects/bdb/lib/libarchive/test/Makefile#3 integrate
.. //depot/projects/bdb/lib/libarchive/test/test_archive_api_feature.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/test/test_empty_write.c#2 integrate
.. //depot/projects/bdb/lib/libarchive/test/test_entry.c#3 integrate
.. //depot/projects/bdb/lib/libarchive/test/test_pax_filename_encoding.c#1 branch
.. //depot/projects/bdb/lib/libarchive/test/test_pax_filename_encoding.tar.gz.uu#1 branch
.. //depot/projects/bdb/lib/libarchive/test/test_write_compress.c#1 branch
.. //depot/projects/bdb/lib/libc/gen/scandir.c#2 integrate
.. //depot/projects/bdb/lib/libc/gen/sem_timedwait.3#2 integrate
.. //depot/projects/bdb/lib/libc/gen/sem_wait.3#3 integrate
.. //depot/projects/bdb/lib/libc/sys/kldunload.2#3 integrate
.. //depot/projects/bdb/lib/libpmc/pmc.3#2 integrate
.. //depot/projects/bdb/lib/libthr/thread/thr_create.c#3 integrate
.. //depot/projects/bdb/release/doc/en_US.ISO8859-1/relnotes/article.sgml#2 integrate
.. //depot/projects/bdb/sbin/atacontrol/atacontrol.c#2 integrate
.. //depot/projects/bdb/sbin/geom/class/multipath/gmultipath.8#3 integrate
.. //depot/projects/bdb/share/examples/cvsup/cvs-supfile#2 integrate
.. //depot/projects/bdb/share/man/man9/Makefile#2 integrate
.. //depot/projects/bdb/share/man/man9/rwlock.9#2 integrate
.. //depot/projects/bdb/share/man/man9/stack.9#2 integrate
.. //depot/projects/bdb/sys/amd64/acpica/acpi_machdep.c#2 integrate
.. //depot/projects/bdb/sys/amd64/acpica/madt.c#2 integrate
.. //depot/projects/bdb/sys/amd64/amd64/intr_machdep.c#2 integrate
.. //depot/projects/bdb/sys/amd64/amd64/legacy.c#3 integrate
.. //depot/projects/bdb/sys/amd64/amd64/local_apic.c#2 integrate
.. //depot/projects/bdb/sys/amd64/amd64/machdep.c#3 integrate
.. //depot/projects/bdb/sys/amd64/amd64/mptable.c#2 integrate
.. //depot/projects/bdb/sys/amd64/amd64/nexus.c#2 integrate
.. //depot/projects/bdb/sys/amd64/ia32/ia32_signal.c#2 integrate
.. //depot/projects/bdb/sys/amd64/include/intr_machdep.h#2 integrate
.. //depot/projects/bdb/sys/amd64/include/nexusvar.h#1 branch
.. //depot/projects/bdb/sys/amd64/isa/atpic.c#2 integrate
.. //depot/projects/bdb/sys/amd64/linux32/linux32_proto.h#2 integrate
.. //depot/projects/bdb/sys/amd64/linux32/linux32_syscall.h#2 integrate
.. //depot/projects/bdb/sys/amd64/linux32/linux32_sysent.c#2 integrate
.. //depot/projects/bdb/sys/amd64/linux32/linux32_sysvec.c#3 integrate
.. //depot/projects/bdb/sys/amd64/linux32/syscalls.master#2 integrate
.. //depot/projects/bdb/sys/arm/arm/intr.c#2 integrate
.. //depot/projects/bdb/sys/arm/arm/machdep.c#2 integrate
.. //depot/projects/bdb/sys/arm/arm/vm_machdep.c#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/Makefile#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/common/main.c#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/Makefile#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/api_public.h#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/copy.c#3 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/devicename.c#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/disk.c#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/elf_freebsd.c#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/glue.c#3 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/glue.h#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/libuboot.h#3 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/module.c#2 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/net.c#3 integrate
.. //depot/projects/bdb/sys/boot/uboot/lib/reboot.c#2 integrate
.. //depot/projects/bdb/sys/compat/linux/linux_misc.c#2 integrate
.. //depot/projects/bdb/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#2 integrate
.. //depot/projects/bdb/sys/contrib/opensolaris/uts/common/os/callb.c#2 integrate
.. //depot/projects/bdb/sys/contrib/opensolaris/uts/common/os/taskq.c#2 integrate
.. //depot/projects/bdb/sys/dev/aac/aac.c#2 integrate
.. //depot/projects/bdb/sys/dev/acpica/acpi.c#3 integrate
.. //depot/projects/bdb/sys/dev/acpica/acpivar.h#2 integrate
.. //depot/projects/bdb/sys/dev/hwpmc/pmc_events.h#2 integrate
.. //depot/projects/bdb/sys/dev/ofw/ofw_console.c#2 integrate
.. //depot/projects/bdb/sys/dev/syscons/sysmouse.c#2 integrate
.. //depot/projects/bdb/sys/dev/tdfx/tdfx_pci.c#2 integrate
.. //depot/projects/bdb/sys/dev/usb/usb_quirks.c#2 integrate
.. //depot/projects/bdb/sys/dev/usb/usbdevs#3 integrate
.. //depot/projects/bdb/sys/gdb/gdb_cons.c#2 integrate
.. //depot/projects/bdb/sys/i386/acpica/acpi_machdep.c#2 integrate
.. //depot/projects/bdb/sys/i386/acpica/acpi_wakeup.c#2 integrate
.. //depot/projects/bdb/sys/i386/acpica/madt.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/intr_machdep.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/k6_mem.c#3 integrate
.. //depot/projects/bdb/sys/i386/i386/legacy.c#3 integrate
.. //depot/projects/bdb/sys/i386/i386/local_apic.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/machdep.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/mp_machdep.c#3 integrate
.. //depot/projects/bdb/sys/i386/i386/mptable.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/nexus.c#2 integrate
.. //depot/projects/bdb/sys/i386/i386/vm_machdep.c#3 integrate
.. //depot/projects/bdb/sys/i386/include/intr_machdep.h#2 integrate
.. //depot/projects/bdb/sys/i386/include/nexusvar.h#1 branch
.. //depot/projects/bdb/sys/i386/isa/atpic.c#2 integrate
.. //depot/projects/bdb/sys/i386/linux/linux_proto.h#2 integrate
.. //depot/projects/bdb/sys/i386/linux/linux_syscall.h#2 integrate
.. //depot/projects/bdb/sys/i386/linux/linux_sysent.c#2 integrate
.. //depot/projects/bdb/sys/i386/linux/linux_sysvec.c#3 integrate
.. //depot/projects/bdb/sys/i386/linux/syscalls.master#2 integrate
.. //depot/projects/bdb/sys/i386/svr4/svr4_machdep.c#2 integrate
.. //depot/projects/bdb/sys/i386/xbox/xbox.c#2 integrate
.. //depot/projects/bdb/sys/ia64/ia64/interrupt.c#2 integrate
.. //depot/projects/bdb/sys/ia64/ia64/machdep.c#3 integrate
.. //depot/projects/bdb/sys/ia64/ia64/nexus.c#2 integrate
.. //depot/projects/bdb/sys/ia64/ia64/sscdisk.c#2 integrate
.. //depot/projects/bdb/sys/ia64/isa/isa_dma.c#2 integrate
.. //depot/projects/bdb/sys/kern/init_main.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_alq.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_clock.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_descrip.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_event.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_idle.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_intr.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_linker.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_malloc.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_mbuf.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_module.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_ntptime.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_poll.c#2 integrate
.. //depot/projects/bdb/sys/kern/kern_resource.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_shutdown.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_switch.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_synch.c#3 integrate
.. //depot/projects/bdb/sys/kern/kern_tc.c#2 integrate
.. //depot/projects/bdb/sys/kern/link_elf.c#2 integrate
.. //depot/projects/bdb/sys/kern/link_elf_obj.c#2 integrate
.. //depot/projects/bdb/sys/kern/sched_4bsd.c#3 integrate
.. //depot/projects/bdb/sys/kern/sched_ule.c#3 integrate
.. //depot/projects/bdb/sys/kern/subr_autoconf.c#2 integrate
.. //depot/projects/bdb/sys/kern/subr_eventhandler.c#2 integrate
.. //depot/projects/bdb/sys/kern/subr_log.c#2 integrate
.. //depot/projects/bdb/sys/kern/subr_prof.c#2 integrate
.. //depot/projects/bdb/sys/kern/subr_smp.c#3 integrate
.. //depot/projects/bdb/sys/kern/subr_witness.c#3 integrate
.. //depot/projects/bdb/sys/kern/tty_cons.c#2 integrate
.. //depot/projects/bdb/sys/kern/tty_pts.c#2 integrate
.. //depot/projects/bdb/sys/kern/tty_pty.c#2 integrate
.. //depot/projects/bdb/sys/kern/tty_subr.c#2 integrate
.. //depot/projects/bdb/sys/kern/tty_tty.c#2 integrate
.. //depot/projects/bdb/sys/kern/uipc_domain.c#2 integrate
.. //depot/projects/bdb/sys/kern/uipc_socket.c#2 integrate
.. //depot/projects/bdb/sys/kern/vfs_acl.c#2 integrate
.. //depot/projects/bdb/sys/kern/vfs_bio.c#2 integrate
.. //depot/projects/bdb/sys/kern/vfs_cache.c#2 integrate
.. //depot/projects/bdb/sys/kern/vfs_hash.c#2 integrate
.. //depot/projects/bdb/sys/kern/vfs_lookup.c#2 integrate
.. //depot/projects/bdb/sys/kern/vfs_subr.c#2 integrate
.. //depot/projects/bdb/sys/net/bpf.c#2 integrate
.. //depot/projects/bdb/sys/net/ieee8023ad_lacp.c#2 integrate
.. //depot/projects/bdb/sys/net/ieee8023ad_lacp.h#2 integrate
.. //depot/projects/bdb/sys/net/if.c#3 integrate
.. //depot/projects/bdb/sys/net/if_lagg.c#2 integrate
.. //depot/projects/bdb/sys/net/netisr.c#2 integrate
.. //depot/projects/bdb/sys/net/rtsock.c#2 integrate
.. //depot/projects/bdb/sys/netatm/ipatm/ipatm_load.c#2 integrate
.. //depot/projects/bdb/sys/netatm/sigpvc/sigpvc_if.c#2 integrate
.. //depot/projects/bdb/sys/netatm/spans/spans_if.c#2 integrate
.. //depot/projects/bdb/sys/netatm/uni/uni_load.c#2 integrate
.. //depot/projects/bdb/sys/netinet/ip_ipsec.c#2 integrate
.. //depot/projects/bdb/sys/netinet6/ip6_ipsec.c#2 integrate
.. //depot/projects/bdb/sys/netinet6/ip6_ipsec.h#2 integrate
.. //depot/projects/bdb/sys/netinet6/ip6_output.c#2 integrate
.. //depot/projects/bdb/sys/netipsec/ipsec.c#2 integrate
.. //depot/projects/bdb/sys/netipsec/ipsec_output.c#2 integrate
.. //depot/projects/bdb/sys/netipsec/key.c#2 integrate
.. //depot/projects/bdb/sys/nfsclient/nfs_diskless.c#2 integrate
.. //depot/projects/bdb/sys/pc98/include/nexusvar.h#1 branch
.. //depot/projects/bdb/sys/pc98/pc98/machdep.c#3 integrate
.. //depot/projects/bdb/sys/powerpc/aim/machdep.c#3 integrate
.. //depot/projects/bdb/sys/powerpc/booke/machdep.c#2 integrate
.. //depot/projects/bdb/sys/powerpc/booke/vm_machdep.c#2 integrate
.. //depot/projects/bdb/sys/powerpc/powerpc/intr_machdep.c#3 integrate
.. //depot/projects/bdb/sys/security/audit/audit.c#2 integrate
.. //depot/projects/bdb/sys/sparc64/sparc64/intr_machdep.c#2 integrate
.. //depot/projects/bdb/sys/sparc64/sparc64/vm_machdep.c#2 integrate
.. //depot/projects/bdb/sys/sun4v/sun4v/intr_machdep.c#2 integrate
.. //depot/projects/bdb/sys/sys/bus_dma.h#2 integrate
.. //depot/projects/bdb/sys/sys/eventhandler.h#2 integrate
.. //depot/projects/bdb/sys/sys/interrupt.h#2 integrate
.. //depot/projects/bdb/sys/sys/kernel.h#2 integrate
.. //depot/projects/bdb/sys/sys/module.h#2 integrate
.. //depot/projects/bdb/sys/sys/rwlock.h#2 integrate
.. //depot/projects/bdb/sys/sys/taskqueue.h#2 integrate
.. //depot/projects/bdb/sys/ufs/ffs/ffs_softdep.c#3 integrate
.. //depot/projects/bdb/sys/vm/vm_fault.c#3 integrate
.. //depot/projects/bdb/sys/vm/vm_glue.c#3 integrate
.. //depot/projects/bdb/sys/vm/vm_init.c#2 integrate
.. //depot/projects/bdb/sys/vm/vm_mmap.c#2 integrate
.. //depot/projects/bdb/sys/vm/vm_pageout.c#2 integrate
.. //depot/projects/bdb/sys/vm/vm_zeroidle.c#2 integrate
.. //depot/projects/bdb/tools/tools/editing/freebsd.vim#1 branch
.. //depot/projects/bdb/usr.bin/Makefile#2 integrate
.. //depot/projects/bdb/usr.bin/split/split.1#2 integrate
.. //depot/projects/bdb/usr.bin/split/split.c#2 integrate
.. //depot/projects/bdb/usr.bin/tar/bsdtar.1#2 integrate
.. //depot/projects/bdb/usr.bin/tar/bsdtar.c#2 integrate
.. //depot/projects/bdb/usr.bin/tar/bsdtar.h#2 integrate
.. //depot/projects/bdb/usr.bin/tar/config_freebsd.h#2 integrate
.. //depot/projects/bdb/usr.bin/tar/read.c#2 integrate
.. //depot/projects/bdb/usr.bin/tar/write.c#2 integrate
.. //depot/projects/bdb/usr.bin/uuidgen/Makefile#2 delete
.. //depot/projects/bdb/usr.bin/uuidgen/uuidgen.1#2 delete
.. //depot/projects/bdb/usr.bin/uuidgen/uuidgen.c#2 delete
.. //depot/projects/bdb/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c#3 integrate
.. //depot/projects/bdb/usr.sbin/mixer/Makefile#2 integrate
.. //depot/projects/bdb/usr.sbin/mixer/mixer.8#2 integrate
.. //depot/projects/bdb/usr.sbin/mixer/mixer.c#2 integrate
Differences ...
==== //depot/projects/bdb/ObsoleteFiles.inc#3 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.132 2008/03/08 21:59:43 antoine Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.133 2008/03/13 18:17:46 brueffer Exp $
#
# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
# directories (OLD_DIRS) which should get removed at an update. Recently
@@ -27,6 +27,8 @@
# 20071207: Merged with fortunes-o.real
OLD_FILES+=usr/share/games/fortune/fortunes2-o
OLD_FILES+=usr/share/games/fortune/fortunes2-o.dat
+# 20071201: Removal of XRPU driver
+OLD_FILES+=usr/include/sys/xrpuio.h
# 20071129: Disabled static versions of libkse by default
.if ${DEFAULT_THREAD_LIB} != "libkse" && ${MK_LIBTHR} != "no"
OLD_FILES+=usr/lib/libkse.a
==== //depot/projects/bdb/bin/Makefile#2 (text+ko) ====
@@ -1,5 +1,5 @@
# From: @(#)Makefile 8.1 (Berkeley) 5/31/93
-# $FreeBSD: src/bin/Makefile,v 1.26 2006/03/17 18:54:20 ru Exp $
+# $FreeBSD: src/bin/Makefile,v 1.27 2008/03/13 17:38:06 obrien Exp $
.include <bsd.own.mk>
@@ -37,7 +37,8 @@
sleep \
stty \
sync \
- test
+ test \
+ uuidgen
.if ${MK_RCMDS} != "no"
_rcp= rcp
==== //depot/projects/bdb/bin/uuidgen/Makefile#2 (text+ko) ====
@@ -1,6 +1,4 @@
-# $FreeBSD: src/bin/uuidgen/Makefile,v 1.3 2007/04/09 19:16:48 pjd Exp $
-
-BINDIR= /bin
+# $FreeBSD: src/bin/uuidgen/Makefile,v 1.4 2008/03/13 17:38:06 obrien Exp $
PROG= uuidgen
WARNS?= 6
==== //depot/projects/bdb/lib/libarchive/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libarchive/Makefile,v 1.80 2008/01/23 05:48:07 kientzle Exp $
+# $FreeBSD: src/lib/libarchive/Makefile,v 1.82 2008/03/14 23:00:53 kientzle Exp $
LIB= archive
DPADD= ${LIBBZ2} ${LIBZ}
@@ -81,6 +81,7 @@
archive_write_open_filename.c \
archive_write_open_memory.c \
archive_write_set_compression_bzip2.c \
+ archive_write_set_compression_compress.c \
archive_write_set_compression_gzip.c \
archive_write_set_compression_none.c \
archive_write_set_compression_program.c \
@@ -120,6 +121,8 @@
MLINKS+= archive_entry.3 archive_entry_copy_gname.3
MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3
MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3
+MLINKS+= archive_entry.3 archive_entry_copy_link.3
+MLINKS+= archive_entry.3 archive_entry_copy_link_w.3
MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3
MLINKS+= archive_entry.3 archive_entry_copy_stat.3
MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3
==== //depot/projects/bdb/lib/libarchive/archive.h.in#2 (text+ko) ====
@@ -22,18 +22,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.47 2007/12/30 04:58:21 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.49 2008/03/14 22:19:50 kientzle Exp $
*/
#ifndef ARCHIVE_H_INCLUDED
#define ARCHIVE_H_INCLUDED
-/*
- * This header file corresponds to:
- * Library version @ARCHIVE_VERSION@
- * Shared library version @SHLIB_MAJOR@
- */
-
#include <sys/types.h> /* Linux requires this for off_t */
@ARCHIVE_H_INCLUDE_INTTYPES_H@
#include <stdio.h> /* For FILE * */
@@ -51,58 +45,59 @@
#endif
/*
- * Each of the version identifiers comes as a macro and a function.
+ * The version number is provided as both a macro and a function.
* The macro identifies the installed header; the function identifies
* the library version (which may not be the same if you're using a
* dynamically-linked version of the library).
*/
/*
- * Textual name/version of the library, useful for version displays.
- */
-#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@"
-const char * archive_version(void);
-
-/*
- * The "version stamp" is a single integer that makes it easy to check
- * the exact version: for version a.b.c, the version stamp is
- * printf("%d%03d%03d",a,b,c). For example, version 2.12.108 has
- * version stamp 2012108.
+ * The version number is expressed as a single integer that makes it
+ * easy to compare versions at build time: for version a.b.c, the
+ * version number is printf("%d%03d%03d",a,b,c). For example, if you
+ * know your application requires version 2.12.108 or later, you can
+ * assert that ARCHIVE_VERSION >= 2012108.
*
- * This was introduced with libarchive 1.9.0 in the libarchive 1.x family
- * and libarchive 2.2.4 in the libarchive 2.x family. The following
- * may be useful if you really want to do feature detection for earlier
- * libarchive versions (which defined API_VERSION and API_FEATURE):
+ * This single-number format was introduced with libarchive 1.9.0 in
+ * the libarchive 1.x family and libarchive 2.2.4 in the libarchive
+ * 2.x family. The following may be useful if you really want to do
+ * feature detection for earlier libarchive versions (which defined
+ * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead):
*
- * #ifndef ARCHIVE_VERSION_STAMP
- * #define ARCHIVE_VERSION_STAMP \
+ * #ifndef ARCHIVE_VERSION_NUMBER
+ * #define ARCHIVE_VERSION_NUMBER \
* (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000)
* #endif
*/
-#define ARCHIVE_VERSION_STAMP @LIBARCHIVE_VERSION@
-int archive_version_stamp(void);
+#define ARCHIVE_VERSION_NUMBER @LIBARCHIVE_VERSION@
+int archive_version_number(void);
/*
- * Major version number: If ARCHIVE_API_VERSION !=
- * archive_api_version(), then the library you were linked with is
- * using an incompatible API to the one you were compiled with. This
- * is almost certainly a fatal problem.
- * This is deprecated and will be removed; use ARCHIVE_VERSION_STAMP
- * instead.
+ * Textual name/version of the library, useful for version displays.
*/
-#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_STAMP / 1000000)
-int archive_api_version(void);
+const char * archive_version_string(void);
+#if ARCHIVE_VERSION_NUMBER < 3000000
/*
- * Minor version number. This is deprecated and will be removed.
- * Use ARCHIVE_VERSION_STAMP to adapt to libarchive API variations.
+ * Deprecated; these are older names that will be removed in favor of
+ * the simpler definitions above.
*/
-#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_STAMP / 1000) % 1000)
+#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER
+int archive_version_stamp(void);
+#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@"
+const char * archive_version(void);
+#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000)
+int archive_api_version(void);
+#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000)
int archive_api_feature(void);
+#endif
-
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/* This should never have been here in the first place. */
+/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */
#define ARCHIVE_BYTES_PER_RECORD 512
#define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240
+#endif
/* Declare our basic types. */
struct archive;
@@ -119,6 +114,7 @@
#define ARCHIVE_WARN (-20) /* Partial success. */
/* For example, if write_header "fails", then you can't push data. */
#define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */
+/* But if write_header is "fatal," then this archive is dead and useless. */
#define ARCHIVE_FATAL (-30) /* No more operations are possible. */
/*
@@ -146,7 +142,7 @@
typedef ssize_t archive_read_callback(struct archive *, void *_client_data,
const void **_buffer);
/* Skips at most request bytes from archive and returns the skipped amount */
-#if ARCHIVE_API_VERSION < 2
+#if ARCHIVE_VERSION_NUMBER < 2000000
typedef ssize_t archive_skip_callback(struct archive *, void *_client_data,
size_t request);
#else
@@ -370,7 +366,7 @@
int archive_read_close(struct archive *);
/* Release all resources and destroy the object. */
/* Note that archive_read_finish will call archive_read_close for you. */
-#if ARCHIVE_API_VERSION > 1
+#if ARCHIVE_VERSION_NUMBER >= 2000000
int archive_read_finish(struct archive *);
#else
/* Temporarily allow library to compile with either 1.x or 2.0 API. */
@@ -407,6 +403,7 @@
int archive_write_set_skip_file(struct archive *, dev_t, ino_t);
int archive_write_set_compression_bzip2(struct archive *);
+int archive_write_set_compression_compress(struct archive *);
int archive_write_set_compression_gzip(struct archive *);
int archive_write_set_compression_none(struct archive *);
int archive_write_set_compression_program(struct archive *,
@@ -445,7 +442,7 @@
*/
int archive_write_header(struct archive *,
struct archive_entry *);
-#if ARCHIVE_API_VERSION > 1
+#if ARCHIVE_VERSION_NUMBER >= 2000000
ssize_t archive_write_data(struct archive *, const void *, size_t);
#else
/* Temporarily allow library to compile with either 1.x or 2.0 API. */
@@ -455,7 +452,7 @@
ssize_t archive_write_data_block(struct archive *, const void *, size_t, off_t);
int archive_write_finish_entry(struct archive *);
int archive_write_close(struct archive *);
-#if ARCHIVE_API_VERSION > 1
+#if ARCHIVE_VERSION_NUMBER >= 2000000
int archive_write_finish(struct archive *);
#else
/* Temporarily allow library to compile with either 1.x or 2.0 API. */
==== //depot/projects/bdb/lib/libarchive/archive_entry.3#3 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.16 2008/03/10 14:44:40 jkoshy Exp $
+.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.17 2008/03/14 23:00:53 kientzle Exp $
.\"
.Dd December 15, 2003
.Dt archive_entry 3
@@ -45,6 +45,8 @@
.Nm archive_entry_copy_gname_w ,
.Nm archive_entry_copy_hardlink ,
.Nm archive_entry_copy_hardlink_w ,
+.Nm archive_entry_copy_link ,
+.Nm archive_entry_copy_link_w ,
.Nm archive_entry_copy_pathname_w ,
.Nm archive_entry_copy_stat ,
.Nm archive_entry_copy_symlink ,
==== //depot/projects/bdb/lib/libarchive/archive_entry.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.47 2008/03/12 04:47:37 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.51 2008/03/14 23:19:46 kientzle Exp $");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -207,6 +207,8 @@
static const wchar_t *
aes_get_wcs(struct aes *aes)
{
+ int r;
+
if (aes->aes_wcs == NULL && aes->aes_mbs == NULL)
return NULL;
if (aes->aes_wcs == NULL && aes->aes_mbs != NULL) {
@@ -221,8 +223,13 @@
aes->aes_wcs = aes->aes_wcs_alloc;
if (aes->aes_wcs == NULL)
__archive_errx(1, "No memory for aes_get_wcs()");
- mbstowcs(aes->aes_wcs_alloc, aes->aes_mbs, wcs_length);
+ r = mbstowcs(aes->aes_wcs_alloc, aes->aes_mbs, wcs_length);
aes->aes_wcs_alloc[wcs_length] = 0;
+ if (r == -1) {
+ /* Conversion failed, don't lie to our clients. */
+ free(aes->aes_wcs_alloc);
+ aes->aes_wcs = aes->aes_wcs_alloc = NULL;
+ }
}
return (aes->aes_wcs);
}
@@ -307,6 +314,8 @@
struct archive_entry *
archive_entry_clear(struct archive_entry *entry)
{
+ if (entry == NULL)
+ return (NULL);
aes_clean(&entry->ae_fflags_text);
aes_clean(&entry->ae_gname);
aes_clean(&entry->ae_hardlink);
@@ -752,7 +761,29 @@
aes_set_mbs(&entry->ae_hardlink, target);
}
+/* Set symlink if symlink is already set, else set hardlink. */
void
+archive_entry_copy_link(struct archive_entry *entry, const char *target)
+{
+ if (entry->ae_symlink.aes_mbs != NULL ||
+ entry->ae_symlink.aes_wcs != NULL)
+ aes_copy_mbs(&entry->ae_symlink, target);
+ else
+ aes_copy_mbs(&entry->ae_hardlink, target);
+}
+
+/* Set symlink if symlink is already set, else set hardlink. */
+void
+archive_entry_copy_link_w(struct archive_entry *entry, const wchar_t *target)
+{
+ if (entry->ae_symlink.aes_mbs != NULL ||
+ entry->ae_symlink.aes_wcs != NULL)
+ aes_copy_wcs(&entry->ae_symlink, target);
+ else
+ aes_copy_wcs(&entry->ae_hardlink, target);
+}
+
+void
archive_entry_set_mode(struct archive_entry *entry, mode_t m)
{
entry->stat_valid = 0;
@@ -1148,7 +1179,7 @@
archive_entry_acl_text_w(struct archive_entry *entry, int flags)
{
int count;
- int length;
+ size_t length;
const wchar_t *wname;
const wchar_t *prefix;
wchar_t separator;
==== //depot/projects/bdb/lib/libarchive/archive_entry.h#2 (text+ko) ====
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.24 2007/12/30 04:58:21 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.26 2008/03/14 23:00:53 kientzle Exp $
*/
#ifndef ARCHIVE_ENTRY_H_INCLUDED
@@ -57,7 +57,25 @@
struct archive_entry;
/*
- * File-type constants. These are returned from archive_entry_filetype().
+ * File-type constants. These are returned from archive_entry_filetype()
+ * and passed to archive_entry_set_filetype().
+ *
+ * These values match S_XXX defines on every platform I've checked,
+ * including Windows, AIX, Linux, Solaris, and BSD. They're
+ * (re)defined here because platforms generally don't define the ones
+ * they don't support. For example, Windows doesn't define S_IFLNK or
+ * S_IFBLK. Instead of having a mass of conditional logic and system
+ * checks to define any S_XXX values that aren't supported locally,
+ * I've just defined a new set of such constants so that
+ * libarchive-based applications can manipulate and identify archive
+ * entries properly even if the hosting platform can't store them on
+ * disk.
+ *
+ * These values are also used directly within some portable formats,
+ * such as cpio. If you find a platform that varies from these, the
+ * correct solution is to leave these alone and translate from these
+ * portable values to platform-native values when entries are read from
+ * or written to disk.
*/
#define AE_IFMT 0170000
#define AE_IFREG 0100000
@@ -91,7 +109,8 @@
dev_t archive_entry_devminor(struct archive_entry *);
mode_t archive_entry_filetype(struct archive_entry *);
void archive_entry_fflags(struct archive_entry *,
- unsigned long *set, unsigned long *clear);
+ unsigned long * /* set */,
+ unsigned long * /* clear */);
const char *archive_entry_fflags_text(struct archive_entry *);
gid_t archive_entry_gid(struct archive_entry *);
const char *archive_entry_gname(struct archive_entry *);
@@ -130,7 +149,7 @@
void archive_entry_set_devminor(struct archive_entry *, dev_t);
void archive_entry_set_filetype(struct archive_entry *, unsigned int);
void archive_entry_set_fflags(struct archive_entry *,
- unsigned long set, unsigned long clear);
+ unsigned long /* set */, unsigned long /* clear */);
/* Returns pointer to start of first invalid token, or NULL if none. */
/* Note that all recognized tokens are processed, regardless. */
const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *,
@@ -144,6 +163,8 @@
void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *);
void archive_entry_set_ino(struct archive_entry *, unsigned long);
void archive_entry_set_link(struct archive_entry *, const char *);
+void archive_entry_copy_link(struct archive_entry *, const char *);
+void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *);
void archive_entry_set_mode(struct archive_entry *, mode_t);
void archive_entry_set_mtime(struct archive_entry *, time_t, long);
void archive_entry_set_nlink(struct archive_entry *, unsigned int);
@@ -182,6 +203,13 @@
* = there are many different ACL text formats
* = would like to be able to read/convert archives containing ACLs
* on platforms that lack ACL libraries
+ *
+ * This last point, in particular, forces me to implement a reasonably
+ * complete set of ACL support routines.
+ *
+ * TODO: Extend this to support NFSv4/NTFS permissions. That should
+ * allow full ACL support on Mac OS, in particular, which uses
+ * POSIX.1e-style interfaces to manipulate NFSv4/NTFS permissions.
*/
/*
@@ -216,21 +244,24 @@
*/
void archive_entry_acl_clear(struct archive_entry *);
void archive_entry_acl_add_entry(struct archive_entry *,
- int type, int permset, int tag, int qual, const char *name);
+ int /* type */, int /* permset */, int /* tag */,
+ int /* qual */, const char * /* name */);
void archive_entry_acl_add_entry_w(struct archive_entry *,
- int type, int permset, int tag, int qual, const wchar_t *name);
+ int /* type */, int /* permset */, int /* tag */,
+ int /* qual */, const wchar_t * /* name */);
/*
* To retrieve the ACL, first "reset", then repeatedly ask for the
* "next" entry. The want_type parameter allows you to request only
* access entries or only default entries.
*/
-int archive_entry_acl_reset(struct archive_entry *, int want_type);
-int archive_entry_acl_next(struct archive_entry *, int want_type,
- int *type, int *permset, int *tag, int *qual, const char **name);
-int archive_entry_acl_next_w(struct archive_entry *, int want_type,
- int *type, int *permset, int *tag, int *qual,
- const wchar_t **name);
+int archive_entry_acl_reset(struct archive_entry *, int /* want_type */);
+int archive_entry_acl_next(struct archive_entry *, int /* want_type */,
+ int * /* type */, int * /* permset */, int * /* tag */,
+ int * /* qual */, const char ** /* name */);
+int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */,
+ int * /* type */, int * /* permset */, int * /* tag */,
+ int * /* qual */, const wchar_t ** /* name */);
/*
* Construct a text-format ACL. The flags argument is a bitmask that
@@ -245,10 +276,11 @@
*/
#define ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 1024
#define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 2048
-const wchar_t *archive_entry_acl_text_w(struct archive_entry *, int flags);
+const wchar_t *archive_entry_acl_text_w(struct archive_entry *,
+ int /* flags */);
/* Return a count of entries matching 'want_type' */
-int archive_entry_acl_count(struct archive_entry *, int want_type);
+int archive_entry_acl_count(struct archive_entry *, int /* want_type */);
/*
* Private ACL parser. This is private because it handles some
@@ -259,9 +291,12 @@
* this interface are likely to be surprised when it changes.
*
* You were warned!
+ *
+ * TODO: Move this declaration out of the public header and into
+ * a private header. Warnings above are silly.
*/
int __archive_entry_acl_parse_w(struct archive_entry *,
- const wchar_t *, int type);
+ const wchar_t *, int /* type */);
/*
* extended attributes
@@ -269,7 +304,8 @@
void archive_entry_xattr_clear(struct archive_entry *);
void archive_entry_xattr_add_entry(struct archive_entry *,
- const char *name, const void *value, size_t size);
+ const char * /* name */, const void * /* value */,
+ size_t /* size */);
/*
* To retrieve the xattr list, first "reset", then repeatedly ask for the
@@ -279,7 +315,7 @@
int archive_entry_xattr_count(struct archive_entry *);
int archive_entry_xattr_reset(struct archive_entry *);
int archive_entry_xattr_next(struct archive_entry *,
- const char **name, const void **value, size_t *);
+ const char ** /* name */, const void ** /* value */, size_t *);
/*
* Utility to detect hardlinks.
==== //depot/projects/bdb/lib/libarchive/archive_read_private.h#3 (text+ko) ====
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.5 2008/03/12 04:58:32 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.6 2008/03/15 11:09:16 kientzle Exp $
*/
#ifndef ARCHIVE_READ_PRIVATE_H_INCLUDED
@@ -93,17 +93,10 @@
/*
* Format detection is mostly the same as compression
- * detection, with two significant differences: The bidders
+ * detection, with one significant difference: The bidders
* use the read_ahead calls above to examine the stream rather
* than having the supervisor hand them a block of data to
- * examine, and the auction is repeated for every header.
- * Winning bidders should set the archive_format and
- * archive_format_name appropriately. Bid routines should
- * check archive_format and decline to bid if the format of
- * the last header was incompatible.
- *
- * Again, write support is considerably simpler because there's
- * no need for an auction.
+ * examine.
*/
struct archive_format_descriptor {
==== //depot/projects/bdb/lib/libarchive/archive_read_support_format_mtree.c#2 (text+ko) ====
@@ -24,7 +24,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.2 2008/02/19 06:07:10 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.4 2008/03/15 11:02:47 kientzle Exp $");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -76,12 +76,18 @@
struct mtree_entry *this_entry;
struct archive_string current_dir;
struct archive_string contents_name;
+
+ off_t cur_size, cur_offset;
};
static int cleanup(struct archive_read *);
static int mtree_bid(struct archive_read *);
+static int parse_file(struct archive_read *, struct archive_entry *,
+ struct mtree *, struct mtree_entry *);
static void parse_escapes(char *, struct mtree_entry *);
-static int parse_setting(struct archive_read *, struct mtree *,
+static int parse_line(struct archive_read *, struct archive_entry *,
+ struct mtree *, struct mtree_entry *);
+static int parse_keyword(struct archive_read *, struct mtree *,
struct archive_entry *, char *, char *);
static int read_data(struct archive_read *a,
const void **buff, size_t *size, off_t *offset);
@@ -252,14 +258,16 @@
}
}
+/*
+ * Read in the entire mtree file into memory on the first request.
+ * Then use the next unused file to satisfy each header request.
+ */
static int
read_header(struct archive_read *a, struct archive_entry *entry)
{
- struct stat st;
struct mtree *mtree;
- struct mtree_entry *mentry, *mentry2;
- char *p, *q;
- int r = ARCHIVE_OK, r1;
+ char *p;
+ int r;
mtree = (struct mtree *)(a->format->data);
@@ -278,16 +286,10 @@
a->archive.archive_format_name = mtree->archive_format_name;
for (;;) {
- mentry = mtree->this_entry;
- if (mentry == NULL) {
- mtree->this_entry = NULL;
+ if (mtree->this_entry == NULL)
return (ARCHIVE_EOF);
- }
- mtree->this_entry = mentry->next;
- if (mentry->used)
- continue;
- mentry->used = 1;
- if (strcmp(mentry->name, "..") == 0) {
+ if (strcmp(mtree->this_entry->name, "..") == 0) {
+ mtree->this_entry->used = 1;
if (archive_strlen(&mtree->current_dir) > 0) {
/* Roll back current path. */
p = mtree->current_dir.s
@@ -299,117 +301,165 @@
mtree->current_dir.length
= p - mtree->current_dir.s + 1;
}
- continue;
+ }
+ if (!mtree->this_entry->used) {
+ r = parse_file(a, entry, mtree, mtree->this_entry);
+ return (r);
}
+ mtree->this_entry = mtree->this_entry->next;
+ }
+}
+
+/*
+ * A single file can have multiple lines contribute specifications.
+ * Parse as many lines as necessary, then pull additional information
+ * from a backing file on disk as necessary.
+ */
+static int
+parse_file(struct archive_read *a, struct archive_entry *entry,
+ struct mtree *mtree, struct mtree_entry *mentry)
+{
+ struct stat st;
+ struct mtree_entry *mp;
+ int r = ARCHIVE_OK, r1;
- mtree->filetype = AE_IFREG;
+ mentry->used = 1;
- /* Parse options. */
- p = mentry->option_start;
- while (p < mentry->option_end) {
- q = p + strlen(p);
- r1 = parse_setting(a, mtree, entry, p, q);
- if (r1 != ARCHIVE_OK)
- r = r1;
- p = q + 1;
- }
+ /* Initialize reasonable defaults. */
+ mtree->filetype = AE_IFREG;
+ archive_entry_set_size(entry, 0);
- if (mentry->full) {
- archive_entry_copy_pathname(entry, mentry->name);
- /*
- * "Full" entries are allowed to have multiple
- * lines and those lines aren't required to be
- * adjacent. We don't support multiple lines
- * for "relative" entries nor do we make any
- * attempt to merge data from separate
- * "relative" and "full" entries. (Merging
- * "relative" and "full" entries would require
- * dealing with pathname canonicalization,
- * which is a very tricky subject.)
- */
- mentry2 = mentry->next;
- while (mentry2 != NULL) {
- if (mentry2->full
- && !mentry2->used
- && strcmp(mentry->name, mentry2->name) == 0) {
- /*
- * Add those options as well;
- * later lines override
- * earlier ones.
- */
- p = mentry2->option_start;
- while (p < mentry2->option_end) {
- q = p + strlen(p);
- r1 = parse_setting(a, mtree, entry, p, q);
- if (r1 != ARCHIVE_OK)
- r = r1;
- p = q + 1;
- }
- mentry2->used = 1;
- }
- mentry2 = mentry2->next;
- }
- } else {
- /*
- * Relative entries require us to construct
- * the full path and possibly update the
- * current directory.
- */
- size_t n = archive_strlen(&mtree->current_dir);
- if (n > 0)
- archive_strcat(&mtree->current_dir, "/");
- archive_strcat(&mtree->current_dir, mentry->name);
- archive_entry_copy_pathname(entry, mtree->current_dir.s);
- if (archive_entry_filetype(entry) != AE_IFDIR)
- mtree->current_dir.length = n;
- }
+ /* Parse options from this line. */
+ r = parse_line(a, entry, mtree, mentry);
+ if (mentry->full) {
+ archive_entry_copy_pathname(entry, mentry->name);
/*
- * Try to open and stat the file to get the real size.
- * It would be nice to avoid this here so that getting
- * a listing of an mtree wouldn't require opening
- * every referenced contents file. But then we
- * wouldn't know the actual contents size, so I don't
- * see a really viable way around this. (Also, we may
- * want to someday pull other unspecified info from
- * the contents file on disk.)
+ * "Full" entries are allowed to have multiple lines
+ * and those lines aren't required to be adjacent. We
+ * don't support multiple lines for "relative" entries
+ * nor do we make any attempt to merge data from
+ * separate "relative" and "full" entries. (Merging
+ * "relative" and "full" entries would require dealing
+ * with pathname canonicalization, which is a very
+ * tricky subject.)
*/
- if (archive_strlen(&mtree->contents_name) > 0) {
- mtree->fd = open(mtree->contents_name.s,
- O_RDONLY | O_BINARY);
- if (mtree->fd < 0) {
- archive_set_error(&a->archive, errno,
- "Can't open content=\"%s\"",
- mtree->contents_name.s);
- r = ARCHIVE_WARN;
+ for (mp = mentry->next; mp != NULL; mp = mp->next) {
+ if (mp->full && !mp->used
+ && strcmp(mentry->name, mp->name) == 0) {
+ /* Later lines override earlier ones. */
+ mp->used = 1;
+ r1 = parse_line(a, entry, mtree, mp);
+ if (r1 < r)
+ r = r1;
}
- } else {
- /* If the specified path opens, use it. */
- mtree->fd = open(mtree->current_dir.s,
- O_RDONLY | O_BINARY);
- /* But don't fail if it's not there. */
}
-
+ } else {
/*
- * If there is a contents file on disk, use that size;
- * otherwise leave it as-is (it might have been set from
- * the mtree size= keyword).
+ * Relative entries require us to construct
+ * the full path and possibly update the
+ * current directory.
*/
- if (mtree->fd >= 0) {
- fstat(mtree->fd, &st);
+ size_t n = archive_strlen(&mtree->current_dir);
+ if (n > 0)
+ archive_strcat(&mtree->current_dir, "/");
+ archive_strcat(&mtree->current_dir, mentry->name);
+ archive_entry_copy_pathname(entry, mtree->current_dir.s);
+ if (archive_entry_filetype(entry) != AE_IFDIR)
+ mtree->current_dir.length = n;
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list