Don't preserve uids or permissions of checked out files (MTREE, DEINSTALL,

INSTALL) into package tarballs. Files installed by the package itself are
not affected.
This commit is contained in:
fredb 1999-11-18 02:05:16 +00:00
parent 082c2a59eb
commit 60fae50bc1

View File

@ -1,11 +1,11 @@
/* $NetBSD: file.c,v 1.32 1999/08/24 00:48:39 hubertf Exp $ */
/* $NetBSD: file.c,v 1.33 1999/11/18 02:05:16 fredb Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
#else
__RCSID("$NetBSD: file.c,v 1.32 1999/08/24 00:48:39 hubertf Exp $");
__RCSID("$NetBSD: file.c,v 1.33 1999/11/18 02:05:16 fredb Exp $");
#endif
#endif
@ -542,9 +542,9 @@ copy_file(char *dir, char *fname, char *to)
char cmd[FILENAME_MAX];
if (fname[0] == '/')
(void) snprintf(cmd, sizeof(cmd), "cp -p -r %s %s", fname, to);
(void) snprintf(cmd, sizeof(cmd), "cp -r %s %s", fname, to);
else
(void) snprintf(cmd, sizeof(cmd), "cp -p -r %s/%s %s", dir, fname, to);
(void) snprintf(cmd, sizeof(cmd), "cp -r %s/%s %s", dir, fname, to);
if (vsystem(cmd)) {
cleanup(0);
errx(2, "could not perform '%s'", cmd);