Update of /cvsroot/fink/scripts/pdb
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv14006
Modified Files:
Tag: redesign_pdb
dump
Log Message:
More native handling of Trees in simulated fink.conf
Protect against undef in a regexp pattern match.
Index: dump
===================================================================
RCS file: /cvsroot/fink/scripts/pdb/dump,v
retrieving revision 1.32.2.11
retrieving revision 1.32.2.12
diff -u -d -r1.32.2.11 -r1.32.2.12
--- dump 23 Feb 2007 03:14:39 -0000 1.32.2.11
+++ dump 23 Feb 2007 03:23:35 -0000 1.32.2.12
@@ -138,26 +138,17 @@
&die_with_usage if (not defined $architecture);
-### set default config
-# simulate a fink.conf; there's no actual file, so don't save() it
+### set up our fink
+
open (BASEPATH, "basepath_fink.inc") || die "couldn't open
'basepath_fink.inc'!";
my $basepath = <BASEPATH>;
close(BASEPATH);
chomp $basepath;
-my $config = Fink::Config->new_from_properties({
- 'basepath' => $basepath,
- 'trees' => 'stable/main stable/crypto',
- 'distribution' => $distribution,
- 'architecture' => $architecture,
-});
-
-### read package info
-
# 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";
+my $treelink = "$basepath/fink/dists/$distribution-$tree";
rm_f $treelink;
my $disttree = $tree;
if (-e $treelink) {
@@ -172,7 +163,13 @@
}
}
-$config->set_param("Trees", "$disttree/main $disttree/crypto");
+# simulate a fink.conf; there's no actual file, so don't save() it
+my $config = Fink::Config->new_from_properties({
+ 'basepath' => $basepath,
+ 'trees' => "$disttree/main $disttree/crypto",
+ 'distribution' => $distribution,
+ 'architecture' => $architecture,
+});
# omit actual locally-installed fink if it is present
set_options({exclude_trees=>[qw/status virtual/]});
@@ -208,7 +205,7 @@
$infofile = $vo->get_info_filename();
if ($infofile) {
my $sb = stat($infofile);
- $infofile =~ s/$treelink\///s;
+ $infofile =~ s/$treelink\///s if defined $treelink;
my $dist_dir = readlink($config->{'basepath'} . "/fink/dists");
$infofile = "fink/dists/$dist_dir/$tree/$infofile";
$infofilechanged = strftime "%Y-%m-%d %H:%M:%S", gmtime $sb->mtime;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits