Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25677
Modified Files:
ChangeLog Command.pm
Log Message:
chowname_hr chowns symlinks where possible
Index: Command.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Command.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Command.pm 26 Jan 2006 02:58:51 -0000 1.25
+++ Command.pm 28 Feb 2006 06:53:25 -0000 1.26
@@ -31,6 +31,7 @@
use strict;
use warnings;
+use Config;
use Carp;
use POSIX qw(ceil);
@@ -305,11 +306,22 @@
# chown() won't return false as long as one operation succeeds, so we
# have to call it one at a time.
my $nok = 0;
+ my @links; # no lchown for perl
File::Find::find(
sub {
- $nok ||= !CORE::chown $uid, $gid, $_ unless -l $_;
+ if (-l $_) {
+ push @links, $File::Find::name;
+ } else {
+ $nok ||= !CORE::chown $uid, $gid, $_;
+ }
},
@files) if @files;
+
+ # Some systems have no lchown
+ if ($Config{d_lchown} && @links) {
+ $nok ||= system('/usr/sbin/chown', '-h', "\Q$user\E:\Q$group\E",
+ @links);
+ }
return !$nok;
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1253
retrieving revision 1.1254
diff -u -d -r1.1253 -r1.1254
--- ChangeLog 26 Feb 2006 17:20:23 -0000 1.1253
+++ ChangeLog 28 Feb 2006 06:53:25 -0000 1.1254
@@ -1,3 +1,8 @@
+2006-02-28 Dave Vasilevsky <[EMAIL PROTECTED]>
+
+ * Command.pm: When lchown is available, chowname_hr should affect links.
+ There's no lchown in perl, so we system() it.
+
2006-02-26 Dave Vasilevsky <[EMAIL PROTECTED]>
* PkgVersion.pm: get_aptdb was stomping on $_, which happened to be
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits