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:
parent
b1d0bdf1e9
commit
4ba8953556
@ -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) 2015 Giannis Tsaraias <tsg@openbsd.org>
|
||||||
# Copyright (c) 2019 Andrew Hewus Fresh <afresh1@openbsd.org>
|
# Copyright (c) 2019 Andrew Hewus Fresh <afresh1@openbsd.org>
|
||||||
@ -22,7 +22,7 @@ use warnings;
|
|||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use Fcntl qw( :mode );
|
use Fcntl qw( :mode );
|
||||||
use File::Copy qw ( cp );
|
use File::Copy qw( cp );
|
||||||
use File::Find qw();
|
use File::Find qw();
|
||||||
use File::Path qw( make_path );
|
use File::Path qw( make_path );
|
||||||
use JSON::PP;
|
use JSON::PP;
|
||||||
@ -532,7 +532,7 @@ sub make_portdir
|
|||||||
if ( -e $old ) {
|
if ( -e $old ) {
|
||||||
my ($dst) = $new =~ m{^(.*)/[^/]+$};
|
my ($dst) = $new =~ m{^(.*)/[^/]+$};
|
||||||
make_path($dst) unless -e $dst;
|
make_path($dst) unless -e $dst;
|
||||||
copy( $old, $dst )
|
cp( $old, $dst )
|
||||||
or die "Unable to copy $old to $new: $!";
|
or die "Unable to copy $old to $new: $!";
|
||||||
|
|
||||||
unlink glob("$new/pkg/PLIST*.orig");
|
unlink glob("$new/pkg/PLIST*.orig");
|
||||||
|
Loading…
Reference in New Issue
Block a user