Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32480/perlmod/Fink
Modified Files:
Tag: dist-up-branch
Engine.pm PkgVersion.pm SelfUpdate.pm Services.pm
Log Message:
almost done phase 1. next: sync with HEAD
Index: Services.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Services.pm,v
retrieving revision 1.158.2.9
retrieving revision 1.158.2.10
diff -u -d -r1.158.2.9 -r1.158.2.10
--- Services.pm 18 May 2005 04:06:29 -0000 1.158.2.9
+++ Services.pm 28 May 2005 23:06:40 -0000 1.158.2.10
@@ -1275,7 +1275,15 @@
sub checkDistribution
{
- return 0
+ use Fink::Config qw($distribution);
+ our $distribution;
+
+ if (get_system_version() =~ /^\Q$distribution\E.*/)
+ {
+ return 0;
+ } else {
+ return 1;
+ }
}
=item get_system_perl_version
Index: PkgVersion.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v
retrieving revision 1.393.2.5
retrieving revision 1.393.2.6
diff -u -d -r1.393.2.5 -r1.393.2.6
--- PkgVersion.pm 17 May 2005 18:10:03 -0000 1.393.2.5
+++ PkgVersion.pm 28 May 2005 23:06:39 -0000 1.393.2.6
@@ -2049,6 +2049,15 @@
my ($renamefield, @renamefiles, $renamefile, $renamelist, $expand);
my ($tarcommand, $tarflags, $cat, $gzip, $bzip2, $unzip,
$found_archive_sum);
+ unless ($self->get_name() eq "fink")
+ {
+ if (Fink::Services::checkDistribution())
+ {
+ my $msg = "\n\nThe Fink Distribution currently set is
not compatable with your current system version.\nPlease run `fink selfupdate'
and then `fink dist-upgrade' to\nmigrate to the latest fink distribution for
your OS.\n\n";
+ die $msg;
+ }
+ }
+
if ($self->is_type('bundle') || $self->is_type('dummy')) {
return;
}
Index: Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.263.2.7
retrieving revision 1.263.2.8
diff -u -d -r1.263.2.7 -r1.263.2.8
--- Engine.pm 18 May 2005 04:06:28 -0000 1.263.2.7
+++ Engine.pm 28 May 2005 23:06:39 -0000 1.263.2.8
@@ -106,8 +106,7 @@
'splits' => [\&cmd_splitoffs,
1, 0, 0],
'showparent' => [\&cmd_showparent, 1,
0, 0],
'dumpinfo' => [\&cmd_dumpinfo,
1, 0, 0],
- 'dist-upgrade' => [\&cmd_dist_upgrade,
1, 0, 0],
- 'dist-upgrade-cont' => [\&cmd_dist_upgrade_cont, 1, 0, 0],
+ 'dist-upgrade' => [\&cmd_dist_upgrade,
1, 1, 0],
'show-deps' => [\&cmd_show_deps,
1, 0, 0],
);
@@ -379,13 +378,34 @@
sub cmd_dist_upgrade
{
- unless (Fink::Services::checkDistribution())
+ if (Fink::Services::checkDistribution())
{
- print("FOO!!!!!");
- print("Fink::Services::checkDistribution: " .
Fink::Services::checkDistribution())
- #my $distribution = "10.4-transitional";
- #$config->set_param("Distribution", $distribution);
- #$config->save();
+ my $host = `$basepath/lib/fink/update/config.guess`;
+ chomp($host);
+ if ($host =~ /^\s*$/)
+ {
+ print " ERROR: Can't determine host type.\n";
+ exit 1;
+ }
+
+ my $distribution = Fink::Bootstrap::check_host($host);
+ $config->set_param("Distribution", $distribution);
+ $config->save();
+
+ my $distdir = "$basepath/fink/dists";
+ # fix dists symlink
+ unlink $distdir;
+ if (&execute("ln -s $distribution $distdir"))
+ {
+ print "ERROR: Can't create link from $distribution to
$distdir\n";
+ exit 1;
+ }
+ print("Fink's distribution is now set to $distribution. Please
run ".
+ "`fink selfupdate' followed by `fink
update-all' to be ".
+ "completely up to date.\n");
+
+ } else {
+ print("Nothing to do at this time.\n\n");
}
}
@@ -1449,16 +1469,7 @@
and $package->is_installed()) {
next;
}
- # for build, check sanity of Distribution. Skip if present, but
not installed
- if ($op == $OP_BUILD and not ($package->is_present() or
($pkgname eq "fink")))
- {
- unless (Fink::Services::checkDistribution())
- {
- print("Your current Fink distribution
($distribution) is not compatible with OS X " . Fink::Services::get_osx_vers()
. "\n");
- print("Please run `fink dist-upgrade' to
upgrade to a compatable version for your system.\n");
- exit;
- }
- }
+
# for build, also skip if present, but not installed
if ($op == $OP_BUILD and $package->is_present()) {
next;
Index: SelfUpdate.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/SelfUpdate.pm,v
retrieving revision 1.92.2.3
retrieving revision 1.92.2.4
diff -u -d -r1.92.2.3 -r1.92.2.4
--- SelfUpdate.pm 17 May 2005 18:10:05 -0000 1.92.2.3
+++ SelfUpdate.pm 28 May 2005 23:06:40 -0000 1.92.2.4
@@ -529,15 +529,26 @@
push @elist, @{$package_list};
- # update them
- Fink::Engine::cmd_install(@elist);
-
- # tell the user what has happened
- print "\n";
- &print_breaking("The core packages have been updated. ".
- "You should now update the other
packages ".
- "using commands like 'fink
update-all'.");
- print "\n";
+ # update them, only fink if dist-upgrade must be done
+ if (Fink::Services::checkDistribution())
+ {
+ Fink::Engine::cmd_install(@elist);
+ # tell the user what has happened
+ print "\n";
+ &print_breaking("The core packages have been updated. ".
+ "You should now update the
other packages ".
+ "using commands like 'fink
update-all'.");
+ print "\n";
+ } else {
+ # tell the user what has happened
+ print "\n";
+ &print_breaking("The fink package has been updated. ".
+ "You will be unable to build
any new packages ".
+ "until you so `fink
dist-upgrade', because you ".
+ "are running an old fink
distribution on ".
+ "an incompatible system.");
+ print "\n";
+ }
}
sub rsync_check {
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits