From owner-cvs-src@FreeBSD.ORG Wed Apr 28 22:19:42 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 9FBD016A4CE; Wed, 28 Apr 2004 22:19:42 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 99C4643D49; Wed, 28 Apr 2004 22:19:42 -0700 (PDT) (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 i3T5JgGe070984; Wed, 28 Apr 2004 22:19:42 -0700 (PDT) (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3T5Jg5Z070983; Wed, 28 Apr 2004 22:19:42 -0700 (PDT) (envelope-from kientzle) Message-Id: <200404290519.i3T5Jg5Z070983@repoman.freebsd.org> From: Tim Kientzle Date: Wed, 28 Apr 2004 22:19:42 -0700 (PDT) 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_read_extract.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: Thu, 29 Apr 2004 05:19:42 -0000 kientzle 2004/04/28 22:19:42 PDT FreeBSD src repository Modified files: lib/libarchive archive_read_extract.c Log: Implement ARCHIVE_EXTRACT_UNLINK for regular files. This supports the -U flag to bsdtar. Essentially, this option breaks existing hard links. According to SUSv2, tar is supposed to overwrite existing files on extract by default which, in particular, preserves existing hard links. Note that this is yet another bug in gtar; it appears to always break existing links. (Maybe gtar's -U is broken?) I'm unsure about how to handle this for other file types; the current code always unlinks first unless the NO_OVERWRITE flag is specified. I've commented this issue liberally and will come back to it later. Revision Changes Path 1.10 +49 -7 src/lib/libarchive/archive_read_extract.c