Bug 2435 - build-perl-modules.pl does not correctly check perlBinary - patch included
: build-perl-modules.pl does not correctly check perlBinary - patch included
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Tools
: 6.2.0
: Other Linux (other)
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-30 18:35 UTC by Mike Cappella
Modified: 2008-09-15 14:37 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cappella 2005-10-30 18:35:41 UTC
In build-perl-modules.pl, the check:

        unless (-x $perlBinary) {
                die "Couldn't find a perl binary. Exiting.\n";
        }

is incorrect.  If a user enters a directory such as /usr/bin, the test 
incorrectly succeeds (since directories are typically executatable).  This 
actually happened in thread http://forums.slimdevices.com/showthread.php?
p=61572#post61572 .

The test should evaluate that perlBinary is a regular file as well:

        unless (-f $perlBinary && -x $perlBinary) {
                die "Couldn't find a perl binary. Exiting.\n";
        }

Can someone please update and commit the script?

Thanks
Comment 1 KDF 2005-10-30 22:32:49 UTC
done at change 4959 in trunk and in 6.2.x at change 4960
Comment 2 Chris Owens 2006-06-16 14:41:42 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.