summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkili <kili@openbsd.org>2010-08-23 05:36:20 +0000
committerkili <kili@openbsd.org>2010-08-23 05:36:20 +0000
commit79b74db38b18665f47005d411d0989ac98264b68 (patch)
tree4b3ffcd07c1d450bdf5f12386f81481660aab932
parentfix two problems identified by matthew@: (diff)
downloadwireguard-openbsd-79b74db38b18665f47005d411d0989ac98264b68.tar.xz
wireguard-openbsd-79b74db38b18665f47005d411d0989ac98264b68.zip
When extracting the pkg tar file, don't preserve the atime, just set it
to the current time. Works around a rare race condition that can happen if daily(8) zaps old files from /var/tmp while pkg_add(8) is installing or updating a package and doesn't yet have moved nor even read some of the files in /var/tmp/pkginfo.* (typically +DESCR). Espie wasn't totally happy with this at first, and will eventually work on something better, so I'm omitting documentations bits for now. ok espie@
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index bad5c35756c..b930daa2cba 100644
--- a/usr.sbin/pkg_add/OpenBSD/Ustar.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Ustar.pm,v 1.62 2010/07/28 15:05:33 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.63 2010/08/23 05:36:20 kili Exp $
#
# Copyright (c) 2002-2007 Marc Espie <espie@openbsd.org>
#
@@ -401,7 +401,7 @@ sub set_modes
my $self = shift;
chown $self->{uid}, $self->{gid}, $self->{destdir}.$self->name;
chmod $self->{mode}, $self->{destdir}.$self->name;
- utime $self->{mtime}, $self->{mtime}, $self->{destdir}.$self->name;
+ utime time, $self->{mtime}, $self->{destdir}.$self->name;
}
sub make_basedir