From owner-cvs-src@FreeBSD.ORG Fri Mar 5 21:44:13 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9262516A4CE; Fri, 5 Mar 2004 21:44:13 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF5F43D1D; Fri, 5 Mar 2004 21:44:13 -0800 (PST) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i265iDGe020079; Fri, 5 Mar 2004 21:44:13 -0800 (PST) (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i265iDTM020078; Fri, 5 Mar 2004 21:44:13 -0800 (PST) (envelope-from kientzle) Message-Id: <200403060544.i265iDTM020078@repoman.freebsd.org> From: Tim Kientzle Date: Fri, 5 Mar 2004 21:44:13 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libarchive archive_write_set_format_pax.c archive_write_set_format_shar.c archive_write_set_format_ustar.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2004 05:44:13 -0000 kientzle 2004/03/05 21:44:13 PST FreeBSD src repository Modified files: lib/libarchive archive_write_set_format_pax.c archive_write_set_format_shar.c archive_write_set_format_ustar.c Log: Minor API tweak: The format-specific write_header function now sets the size in the archive_entry object to zero if that format doesn't store a body for that file type. This allows the client to determine whether or not it should feed the file body to the archive. In particular, cpio stores the file body for hardlinks, tar and shar don't. With this change, bsdtar now correctly archives hardlinks in all supported formats. While I'm here, make shar output be more aggressive about creating directories. Before this, commands such as: bsdtar -cv -F shar some/explicit/path/to/a/file wouldn't create the directory. Some simple logic to remember the last directory creation helps reduce unnecessary mkdirs here. At this point, I think the only flaw in libarchive's cpio support is the failure to recognize hardlinks when reading. Revision Changes Path 1.2 +32 -7 src/lib/libarchive/archive_write_set_format_pax.c 1.2 +70 -21 src/lib/libarchive/archive_write_set_format_shar.c 1.2 +8 -8 src/lib/libarchive/archive_write_set_format_ustar.c