I’m currently working on the pdf files and noticed something odd, the PDB
basically runs in a loop for all dist/arch/tree variants, to do this it makes a
virtual config which is loaded in memory. So it doesn’t use files, which is
good, but it seems that Fink::Config->get_treelist() so not respect this, once
the param for trees is set it doesn’t forget it even with an undef
$Fink:Config::config. Here is an example that I built with the relevant bits
to show what happens. The reason this is an issue, so require_packages() will
use get_treelist to populate the $packages var, so that I can we out duplicate
versions before adding them to solr.
Anyhow could some help me figure this out, or fix this issue preventing this?
#!/usr/bin/perl -w
$| = 1;
use 5.008_001; # perl 5.8.1 or newer required
use strict;
use warnings;
use Fink::Services qw(&read_config &latest_version);
use Fink::Config qw(&set_options);
use Fink::Package;
use Fink::Command qw(rm_f);
my $releases = {
'10.9-x86_64-current-unstable',
'10.9-x86_64-current-stable',
};
foreach my $release (%$releases)
{
print "- indexing $release\n";
my ($dist, $arch, $nc, $tree) = split('-', $release);
my $basepath = '/sw';
undef $Fink::Package::packages;
undef $Fink::Config::config;
# simulate a fink.conf; there's no actual file, so don't save() it
my $config = Fink::Config->new_from_properties(
{
'basepath' => $basepath,
'trees' => "$tree/main $tree/crypto",
'distribution' => $dist,
'architecture' => $arch,
}
);
# load the package database
Fink::Package->require_packages();
print "Based on $tree\n";
foreach my $t ($config->get_treelist()) {
print " -> $t\n";
}
print "Based on get_param\n";
print " -> " . $config->param('basepath') . "\n";
print " -> " . $config->param('trees') . "\n";
print " -> " . $config->param('distribution') . "\n";
print " -> " . $config->param('architecture') . "\n";
print "\n";
}
---
TS
http://www.southofheaven.org/
Life begins and ends with chaos, live between the chaos!
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
fink-core mailing list
fink-core@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.core
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-core