Author: sparky
Date: Wed Feb  3 00:02:16 2010
New Revision: 11125

Modified:
   toys/tools/cleanbuild/findunusedbr
Log:
- resolve non-relative symlinks manually


Modified: toys/tools/cleanbuild/findunusedbr
==============================================================================
--- toys/tools/cleanbuild/findunusedbr  (original)
+++ toys/tools/cleanbuild/findunusedbr  Wed Feb  3 00:02:16 2010
@@ -36,6 +36,11 @@
                chop $file;
                my $f = $chroot.$file;
 
+               local $_;
+               while ( $_ = readlink $f and m#^/# ) {
+                        $f = $chroot.$_;
+               }
+
                # XXX: this truncates mtime to its low resolution value
                my $mtime = (stat $f)[9];
                warn "Mtime failed on $f" unless $mtime;
@@ -52,8 +57,15 @@
                chop $file;
                my $f = $chroot.$file;
 
+               local $_;
+               while ( $_ = readlink $f and m#^/# ) {
+                        $f = $chroot.$_;
+               }
+
                my $atime = (stat $f)[8];
-               if ( $atime > 0 ) {
+               if ( not defined $atime ) {
+                       print "$rpm: $f no atime\n";
+               } elsif ( $atime > 0 ) {
                        #print "$rpm: $file accessed\n";
                        #$used = 1;
                        return;
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to