Update of /cvsroot/fink/fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31505

Modified Files:
      Tag: branch_0_24
        ChangeLog bootstrap.pl 
Log Message:
Backport $basepath sanity check fixes from HEAD


Index: bootstrap.pl
===================================================================
RCS file: /cvsroot/fink/fink/bootstrap.pl,v
retrieving revision 1.60.2.1
retrieving revision 1.60.2.2
diff -u -d -r1.60.2.1 -r1.60.2.2
--- bootstrap.pl        23 May 2005 22:09:10 -0000      1.60.2.1
+++ bootstrap.pl        10 Nov 2005 00:07:25 -0000      1.60.2.2
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# -*- mode: Perl; tab-width: 4; -*-
 #
 # bootstrap.pl - perl script to install and bootstrap a Fink
 #                                                               installation 
from source
@@ -56,7 +57,7 @@
 
 if ("$]" == "5.006001") {
     if (not -x "/usr/bin/perl5.6.1") {
-die "\nYou have an incomplete perl installation; you are missing 
/usr/bin/perl5.6.1.\n\nYou must repair this problem before installing 
Fink.\n\n"} 
+       die "\nYou have an incomplete perl installation; you are missing 
/usr/bin/perl5.6.1.\n\nYou must repair this problem before installing 
Fink.\n\n"} 
     elsif (system "/usr/bin/perl5.6.1 -V") {
        die "\nYour /usr/bin/perl5.6.1 is not functional; you must repair this 
problem\nbefore installing Fink.\n\n"}
 }
@@ -262,21 +263,23 @@
        exit 1;
 }
 
-# remove trailing slash
-if (length($installto) > 1 and substr($installto,-1) eq "/") {
-       $installto = substr($installto,0,-1);
-}
-# check well-known paths
-foreach $forbidden (qw(/ /etc /usr /var /bin /sbin /lib /tmp /dev
-                                          /usr/lib /usr/include /usr/bin 
/usr/sbin /usr/share
-                                          /usr/libexec /usr/X11R6
-                                          /root /private /cores /boot)) {
-       if ($installto eq $forbidden) {
+# remove any trailing slash(es)
+$installto =~ s,^(/.*?)/*$,$1,;
+
+# check well-known path (NB: these are regexes!)
+foreach my $forbidden (
+       qw(/ /etc /usr /var /bin /sbin /lib /tmp /dev
+          /usr/lib /usr/include /usr/bin /usr/sbin /usr/share
+          /usr/libexec /usr/X11R6
+          /root /private /cores /boot
+          /debian /debian/.*)
+) {
+       if ($installto =~ /^$forbidden$/i) {
                print "ERROR: Refusing to install into '$installto'.\n";
                exit 1;
        }
 }
-if ($installto eq "/usr/local") {
+if ($installto =~ /^\/usr\/local$/i) {
        $answer =
                &prompt_boolean("Installing Fink in /usr/local is not 
recommended. ".
                                                "It may conflict with third 
party software also ".

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/ChangeLog,v
retrieving revision 1.304.2.30
retrieving revision 1.304.2.31
diff -u -d -r1.304.2.30 -r1.304.2.31
--- ChangeLog   9 Nov 2005 23:50:22 -0000       1.304.2.30
+++ ChangeLog   10 Nov 2005 00:07:25 -0000      1.304.2.31
@@ -1,3 +1,8 @@
+2005-11-09  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * bootstrap.pl: Backport case-insensitivity and dpkg data-struct
+       tests for $basepath.
+
 2005-08-24  Dave Morrison  <[EMAIL PROTECTED]>
 
        * VERSION: Bumped package manager version to 0.24.10, a release



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to