Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv22369

Modified Files:
        ChangeLog Validation.pm 
Log Message:
Don't try to read contents of files that are symlinks when validating a .deb


Index: Validation.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Validation.pm,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- Validation.pm       20 Jul 2006 22:47:56 -0000      1.225
+++ Validation.pm       3 Aug 2006 22:22:01 -0000       1.226
@@ -1352,7 +1352,7 @@
                        if (not exists 
$control_processed->{depends_pkgs}->{daemonic}) {
                                &stack_msg($msgs, "Package contains a 
DaemonicFile but does not depend on the package \"daemonic\"", $filename);
                        }
-                       if (open my $daemonicfile, '<', $File::Find::name) {
+                       if (!-l $File::Find::name and open my $daemonicfile, 
'<', $File::Find::name) {
                                while (<$daemonicfile>) {
                                        if 
(/^\s*<executable.*?>(\S+)<\/executable>\s*$/) {
                                                my $executable = $1;
@@ -1371,14 +1371,14 @@
                                        }
                                }
                                close $daemonicfile;
-                       } else {
+                       } elsif (!-l _) {
                                &stack_msg($msgs, "Couldn't read DaemonicFile 
$File::Find::name: $!");
                        }
                }
 
                # check that libtool files don't link to temp locations
                if ($filename =~/\.la$/) {
-                       if (open my $la_file, '<', $File::Find::name) {
+                       if (!-l $File::Find::name and open my $la_file, '<', 
$File::Find::name) {
                                while (<$la_file>) {
                                        if (/$pkgbuilddir/) {
                                                &stack_msg($msgs, "Libtool file 
points to fink build dir.", $filename);
@@ -1389,14 +1389,14 @@
                                        }
                                }
                                close $la_file;
-                       } else {
+                       } elsif (!-l _) {
                                &stack_msg($msgs, "Couldn't read libtool file 
\"$filename\": $!");
                        }
                }
 
                # check that compiled python modules files don't self-identify 
using temp locations
                if ($filename =~/\.py[co]$/) {
-                       if (open my $py_file, "strings $File::Find::name |") {
+                       if (!-l $File::Find::name and open my $py_file, 
"strings $File::Find::name |") {
                                while (<$py_file>) {
                                        if (/$pkgbuilddir/) {
                                                &stack_msg($msgs, "Compiled 
python module points to fink build dir.", $filename);
@@ -1407,7 +1407,7 @@
                                        }
                                }
                                close $py_file;
-                       } else {
+                       } elsif (!-l _) {
                                &stack_msg($msgs, "Couldn't read compiled 
python module file \"$filename\": $!");
                        }
                }
@@ -1429,7 +1429,7 @@
 
                # Check for common programmer mistakes relating to passing 
-framework flags in pkg-config files
                if ($filename =~ /\.pc$/) {
-                       if (open my $pc_file, '<', $File::Find::name) {
+                       if (!-l $File::Find::name and open my $pc_file, '<', 
$File::Find::name) {
                                while (<$pc_file>) {
                                        chomp;
                                        if (/\s((?:-W.,|)-framework)[^,]/) {
@@ -1437,7 +1437,7 @@
                                        }
                                }
                                close $pc_file;
-                       } else {
+                       } elsif (!-l _) {
                                &stack_msg($msgs, "Couldn't read pkg-config 
file \"$filename\": $!");
                        }
                }

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1358
retrieving revision 1.1359
diff -u -d -r1.1358 -r1.1359
--- ChangeLog   27 Jul 2006 05:11:43 -0000      1.1358
+++ ChangeLog   3 Aug 2006 22:22:01 -0000       1.1359
@@ -1,3 +1,9 @@
+2006-08-03  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * Validation.pm: When validating the contents of a file in a .deb,
+       only do so if it's a real file (symlinks might be absolute or to
+       files in a different .deb)
+
 2006-07-26  Daniel Macks  <[EMAIL PROTECTED]>
 
        * Services.pm: Fix execute() to resurrect the whole env even if


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to