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

Modified Files:
        dump 
Log Message:
Use dist-specific symlinks for tree dirs if possible.


Index: dump
===================================================================
RCS file: /cvsroot/fink/scripts/pdb/dump,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- dump        28 Apr 2005 18:09:23 -0000      1.18
+++ dump        28 Apr 2005 23:18:33 -0000      1.19
@@ -38,9 +38,6 @@
 my $tree = shift || "stable";
 my $release = shift || "current-$distribution-$tree";
 
-$config->set_param("Trees", "$tree/main $tree/crypto");
-# this is a volatile change, we don't (and mustn't) call save()
-
 ### read package info
 
 # temporarily send stdout to stderr
@@ -48,7 +45,24 @@
 open(STDOUT, ">&STDERR") or die "Can't dup stderr";
 select(OLDOUT); select(STDOUT);  # keep 'use strict' happy
 
-Fink::Package->forget_packages(0, 0);
+# if possible, use a symlink $distribution-$tree -> $tree
+# so that each .info pathname is unique across all distributions
+# (since we may use the dists/ symlink not the actual $distribution dir)
+my $treelink = $config->{'basepath'} . "/fink/dists/$distribution-$tree";
+rm_f $treelink;
+if (-e $treelink) {
+    print "Could not remove old $treelink\n";
+} else {
+    if (symlink $tree, $treelink) {
+       $tree = "$distribution-$tree";
+    } else {
+       print "Could not create symlink $treelink: $!\n";
+    }
+}
+
+$config->set_param("Trees", "$tree/main $tree/crypto");
+# this is a volatile change, we don't (and mustn't) call save()
+
 Fink::Package->require_packages();
 
 # restore stdout



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to