Use the File::Copy cp() alias instead of copy(), because it preserves file

permissions. This is closer to system cp -a, which was used before.
This commit is contained in:
sdk 2022-01-05 21:23:18 +00:00
parent b1d0bdf1e9
commit 4ba8953556

View File

@ -1,4 +1,4 @@
# $OpenBSD: Port.pm,v 1.23 2022/01/05 18:28:25 sdk Exp $
# $OpenBSD: Port.pm,v 1.24 2022/01/05 21:23:18 sdk Exp $
#
# Copyright (c) 2015 Giannis Tsaraias <tsg@openbsd.org>
# Copyright (c) 2019 Andrew Hewus Fresh <afresh1@openbsd.org>
@ -532,7 +532,7 @@ sub make_portdir
if ( -e $old ) {
my ($dst) = $new =~ m{^(.*)/[^/]+$};
make_path($dst) unless -e $dst;
copy( $old, $dst )
cp( $old, $dst )
or die "Unable to copy $old to $new: $!";
unlink glob("$new/pkg/PLIST*.orig");