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

Modified Files:
      Tag: dist-up-branch
        ChangeLog Makefile inject.pl postinstall.pl.in 
Log Message:
Sync with HEAD and more updates, dist-upgrade almost works for changing trees 
10.[23]->10.4-trans 


Index: inject.pl
===================================================================
RCS file: /cvsroot/fink/fink/inject.pl,v
retrieving revision 1.24.6.1
retrieving revision 1.24.6.2
diff -u -d -r1.24.6.1 -r1.24.6.2
--- inject.pl   27 Apr 2005 16:11:15 -0000      1.24.6.1
+++ inject.pl   17 May 2005 18:09:58 -0000      1.24.6.2
@@ -63,4 +63,3 @@
 
 
 
-# vim: ts=4 sw=4 noet

Index: postinstall.pl.in
===================================================================
RCS file: /cvsroot/fink/fink/postinstall.pl.in,v
retrieving revision 1.27.4.2
retrieving revision 1.27.4.3
diff -u -d -r1.27.4.2 -r1.27.4.3
--- postinstall.pl.in   11 May 2005 20:07:09 -0000      1.27.4.2
+++ postinstall.pl.in   17 May 2005 18:09:58 -0000      1.27.4.3
@@ -33,7 +33,7 @@
 use Fink::Services qw(&read_config &execute);
 use Fink::CLI qw(&print_breaking &prompt_boolean);
 
-use Fink::Config qw($config);
+use Fink::Config qw($config &get_option);
 use Fink::Configure qw($conf_file_compat_version);
 
 use File::Find;
@@ -46,10 +46,11 @@
 my $config;
 my $configpath = "@PREFIX@/etc/fink.conf";
 my $configNeedsUpdate = 0;
+
 if (-f $configpath) {
-  $config = &Fink::Services::read_config($configpath, 
-                                         { Basepath => '@PREFIX@' }
-                                        );
+       $config = &Fink::Services::read_config($configpath, 
+                                                                               
  { Basepath => '@PREFIX@' }
+                                                                               
  );
 } else {
   print "ERROR: Configuration file \"$configpath\" not found.\n";
   exit 1;
@@ -60,11 +61,12 @@
 ### compatibility version has changed.
 my $expectedConfFileCompatVersion = $Fink::Configure::conf_file_compat_version;
 my $actualConfFileCompatVersion = 
$config->param_default("ConfFileCompatVersion", "0");
+
 if ($expectedConfFileCompatVersion > $actualConfFileCompatVersion) {
-  $configNeedsUpdate = 1;
+       $configNeedsUpdate = 1;
 }
 elsif ($expectedConfFileCompatVersion < $actualConfFileCompatVersion) {
-  &print_breaking("\nWARNING: Your fink configuration file \"$configpath\" " . 
+       &print_breaking("\nWARNING: Your fink configuration file 
\"$configpath\" " .
         "was created from a fink version newer than this one! Try to run " .
         "'fink configure' or reinstall the latest fink to correct this.\n\n");
 }
@@ -90,10 +92,25 @@
        exit(1);
 }
 
-### save $distribution in the config file
+### save $distribution in the config file, making sure not to stomp current 
settings
 
-$config->set_param("Distribution", $distribution);
-$config->save();
+my $current_dist = get_option("Distribution", $distribution);
+print("$distribution $current_dist \n");
+exit 1;
+if ($current_dist ne $distribution) {
+       print("\nYou seem to be running a fink tree that is not designed for " .
+       "this system version. Feel free to continue using fink, but you will be 
" .
+       "unable to build any new packages until you do a `fink dist-upgrade' 
and " .
+       "upgrade your fink install to the aproproiate tree.");
+
+       ### Don't change current Dist setting. Only change on dist-upgrade
+       $distribution = $current_dist;
+       $config->set_param("Distribution", $distribution);
+       $config->save();
+} else {
+       $config->set_param("Distribution", $distribution);
+       $config->save();
+}
 
 ### Find the user who owns dists
 
@@ -205,13 +222,13 @@
   find ({ wanted => $wanted, follow => 1,  no_chdir => 1 }, 
"$basepath/fink/10.1");
 }
 
-### Now, if we are running 10.2 or later, we need to create 
$basepath/fink/10.2 if
-### still needed, and then make a symlink
+### Now, if we are running 10.2 or later, we need to create $basepath/fink/10.2
+### if still needed, and then make a symlink
 
 if (not $distribution =~ /10.1/) {
   # For now, 10.4 should be a link to 10.4-transitional
   if($distribution eq "10.4" and not -d "10.4") {
-    if (&execute("ln -s 10.4-transitional 10.4")) {
+    if (&execute("ln -sf 10.4-transitional 10.4")) {
       print "ERROR: Can't create link from 10.4-transitional to 10.4\n";
       exit 1;
     }

Index: Makefile
===================================================================
RCS file: /cvsroot/fink/fink/Makefile,v
retrieving revision 1.16.6.1
retrieving revision 1.16.6.2
diff -u -d -r1.16.6.1 -r1.16.6.2
--- Makefile    27 Apr 2005 16:11:15 -0000      1.16.6.1
+++ Makefile    17 May 2005 18:09:58 -0000      1.16.6.2
@@ -1,6 +1,7 @@
 PREFIX=/sw
 VERSION=`cat VERSION`
 TEST_BASEPATH=$(PWD)/t/basepath
+TESTS=.
 
 all:
        @echo    "usage: $(MAKE) <target>"
@@ -27,7 +28,7 @@
 test: test_setup
        @# must test with same perl binary as the one to be used to run fink
        @# (which also must be coded into t/Services/execute_nonroot_okay.t)
-       @cd t && ./testmore.pl || find . -name '*.t' | sort | xargs 
/usr/bin/perl -I${PWD}/perlmod -MTest::Harness -e 'runtests(@ARGV)'
+       @cd t && ./testmore.pl || find ${TESTS} -name '*.t' | sort | xargs 
/usr/bin/perl -I${PWD}/perlmod -MTest::Harness -e 'runtests(@ARGV)'
 
 .PHONY: all test install
 # vim: ts=4 sw=4 noet

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/ChangeLog,v
retrieving revision 1.323.2.3
retrieving revision 1.323.2.4
diff -u -d -r1.323.2.3 -r1.323.2.4
--- ChangeLog   11 May 2005 20:07:01 -0000      1.323.2.3
+++ ChangeLog   17 May 2005 18:09:46 -0000      1.323.2.4
@@ -1,3 +1,19 @@
+2005-05-16  Matthew Sachs  <[EMAIL PROTECTED]>
+
+       * postinstall.pl.in: Use ln -sf instead of ln -s
+       to make the 10.4 symlink; otherwise "fink rebuild fink"
+       will fail under FINK_NOTRANS since the symlink will
+       already exist.
+
+2005-05-16  Chris Zubrzycki <[EMAIL PROTECTED]>
+
+       * postinstall.pl.in: Make fink aware of dist-upgrade and do not
+       change the Dist of fink without a dist-upgrade
+
+2005-05-16  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * Makefile: 'test' target takes TESTS var to only run subset of tests
+
 2005-05-11  Dave Morrison  <[EMAIL PROTECTED]>
 
        * VERSION: Bumped package manager version to 0.24.6, a release



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to