From nobody@FreeBSD.org  Sun Oct  3 04:45:09 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A782106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Oct 2010 04:45:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A5A58FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Oct 2010 04:45:09 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o934j9mi014903
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 3 Oct 2010 04:45:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o934j9ej014902;
	Sun, 3 Oct 2010 04:45:09 GMT
	(envelope-from nobody)
Message-Id: <201010030445.o934j9ej014902@www.freebsd.org>
Date: Sun, 3 Oct 2010 04:45:09 GMT
From: grarpamp <grarpamp@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_add -K should preserve file metadata
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151168
>Category:       bin
>Synopsis:       pkg_add(1): pkg_add -K should preserve file metadata
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 03 04:50:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Thu Oct 07 13:08:47 UTC 2010
>Originator:     grarpamp
>Release:        i386: HEAD, RELENG_8
>Organization:
>Environment:
Not relevant.
>Description:
pkg_add -K should preserve the source file's metadata
when saving the destination file in the PKGDIR.
This will make it much easier to compare the PKGDIR
contents with, say, an ftp  mirror... bye eye, or with,
say, rsync. It will also stop needless file transfers
that take place just because some file somewhere has
a newer timestamp, due to perhaps removing files from
PKGDIR and running pkg_add again, mirrors, backups, etc.
>How-To-Repeat:
Use pkg_add -K.
>Fix:
Patch the pkg_install toolset to use the fetch(3) functions:
fetchXGetURL()
fetchStatURL()

>Release-Note:
>Audit-Trail:
>Unformatted:
