Update of /cvsroot/fink/fink/mirror
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv17331
Modified Files:
ChangeLog anonymous-cvs cvs-repository developer-cvs
postinstall.pl.in
Log Message:
change of CVS repository, including a postinstall script
Index: cvs-repository
===================================================================
RCS file: /cvsroot/fink/fink/mirror/cvs-repository,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cvs-repository 13 Jul 2004 04:55:24 -0000 1.1
+++ cvs-repository 15 May 2006 17:49:30 -0000 1.2
@@ -1 +1 @@
-cvs.sourceforge.net
+fink.cvs.sourceforge.net
Index: developer-cvs
===================================================================
RCS file: /cvsroot/fink/fink/mirror/developer-cvs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- developer-cvs 6 May 2006 21:43:06 -0000 1.2
+++ developer-cvs 15 May 2006 17:49:30 -0000 1.3
@@ -1 +1 @@
-cvs.sourceforge.net:/cvsroot/fink
+fink.cvs.sourceforge.net:/cvsroot/fink
Index: postinstall.pl.in
===================================================================
RCS file: /cvsroot/fink/fink/mirror/postinstall.pl.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- postinstall.pl.in 3 Jan 2006 19:51:16 -0000 1.11
+++ postinstall.pl.in 15 May 2006 17:49:30 -0000 1.12
@@ -40,3 +40,90 @@
#get mirror selections, write write new configuration file if changed
choose_mirrors(1) || $config->save();
+# now we correct the CVS location... the code below should eventually be
+# moved to fink itself and called from here
+
+use File::Find ();
+
+# Set the variable $File::Find::dont_use_nlink if you're using AFS,
+# since AFS cheats.
+
+# for the convenience of &wanted calls, including -eval statements:
+use vars qw/*name *dir *prune/;
+*name = *File::Find::name;
+*dir = *File::Find::dir;
+*prune = *File::Find::prune;
+
+sub wanted;
+sub doexec ($@);
+
+
+use Cwd ();
+my $cwd = Cwd::cwd();
+
+my ($method_user, $repo, $repo_file, $stored_repo);
+
+# parse CVS/Root
+if (-d "@PREFIX@/fink/dists/CVS") {
+ open(IN,"@PREFIX@/fink/dists/CVS/Root") or die "can't open
@PREFIX@/fink/dists/CVS/Root: $!";
+ while (<IN>) {
+ chomp;
+ if (/^(:\w+:\w+@)(.+)$/) {
+ $method_user = $1;
+ $repo = $2;
+ }
+ }
+ close(IN);
+ die "couldn't parse @PREFIX@/fink/dists/CVS/Root" unless ((defined
$method_user) and (defined $repo));
+ if ($method_user eq ":pserver:anonymous") {
+ $repo_file = "anonymous-cvs";
+ } else {
+ $repo_file = "developer-cvs";
+ }
+
+ open(IN,"@PREFIX@/lib/fink/URL/$repo_file") or die "can't open
@PREFIX@/lib/fink/URL/$repo_file: $!";
+# we are assuming that this file only has one line
+ while (<IN>) {
+ chomp;
+ $stored_repo = $_;
+ }
+ close(IN);
+ if (!($stored_repo eq $repo)) {
+
+# Traverse desired filesystems
+File::Find::find({wanted => \&wanted}, '@PREFIX@/fink');
+exit;
+
+ }
+}
+
+sub wanted {
+ my ($dev,$ino,$mode,$nlink,$uid,$gid);
+
+ /^CVS\z/s &&
+ (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
+ -d _ &&
+ doexec(0, 'perl','-pi','-e',"s|$repo|$stored_repo|",'{}/Root');
+}
+
+
+sub doexec ($@) {
+ my $ok = shift;
+ my @command = @_; # copy so we don't try to s/// aliases to constants
+ for my $word (@command)
+ { $word =~ s#{}#$name#g }
+ if ($ok) {
+ my $old = select(STDOUT);
+ $| = 1;
+ print "@command";
+ select($old);
+ return 0 unless <STDIN> =~ /^y/;
+ }
+ chdir $cwd; #sigh
+ system @command;
+ chdir $File::Find::dir;
+ return !$?;
+}
+
+
+
Index: anonymous-cvs
===================================================================
RCS file: /cvsroot/fink/fink/mirror/anonymous-cvs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- anonymous-cvs 6 May 2006 21:43:06 -0000 1.1
+++ anonymous-cvs 15 May 2006 17:49:29 -0000 1.2
@@ -1 +1 @@
-cvs.sourceforge.net:/cvsroot/fink
+fink.cvs.sourceforge.net:/cvsroot/fink
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/mirror/ChangeLog,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- ChangeLog 6 May 2006 21:43:06 -0000 1.99
+++ ChangeLog 15 May 2006 17:49:29 -0000 1.100
@@ -1,3 +1,10 @@
+2006-05-15 Dave Morrison <[EMAIL PROTECTED]>
+
+ * anonymous-cvs, developer-cvs, cvs-repository: change to
+ fink.cvs.sourceforge.net
+ * postinstall.pl.in: when the CVS repository in /sw/fink/dists/CVS/Root
+ is not correct, fix it in all CVS/Root files
+
2006-05-06 Dave Morrison <[EMAIL PROTECTED]>
* VERSION: releasing version 0.24.15.1 of fink-mirrors
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits