From 5e3d9f765da35bd88f5663f18292b260d50b90cc Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 3 Mar 2006 12:55:15 +0000 Subject: use lchown instead of chown (otherwise pbs on broken symlinks) --- perl-install/commands.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/commands.pm b/perl-install/commands.pm index 6719151f1..c57468cb0 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -127,10 +127,11 @@ sub chown_ { my ($name, $group) = (split('\.'), $_); my ($uid, $gid) = (getpwnam($name) || $name, getgrnam($group) || $group); - + + require POSIX; my $chown; $chown = sub { foreach (@_) { - chown $uid, $gid, $_ or die "chown of file $_ failed: $!\n"; + POSIX::lchown($uid, $gid, $_) or die "chown of file $_ failed: $!\n"; -d $_ && $rec and &$chown(glob_($_)); } }; -- cgit v1.2.1