Hi,
As my previous message seems to get very small audience, I rewrite it... please
excuse my previous mail, which was bad written.
The purpose is to permit the use of out-of-date(1) with customized mk.conf(5),
in particular the usage of PORTSDIR_PATH (search path for package
specifications).
The patch replace the search of path of installed packages, from a directory
existence check, to something that let make search the patch for us, and parse
the errors (in order to set not-found packages).
My use case is the "mystuff" directory (with is included by default in
PORTSDIR_PATH). With the patch, packages build from mystuff are found by
out-of-date (and so, reported as not up-to-date if there are), else there are
reported as "not found".
If this proposal is not good, please let me know.
Thanks.
--
Sebastien Marie
Index: out-of-date
===================================================================
RCS file: /cvs/ports/infrastructure/bin/out-of-date,v
retrieving revision 1.5
diff -u -p -r1.5 out-of-date
--- out-of-date 7 May 2012 15:57:51 -0000 1.5
+++ out-of-date 16 Dec 2012 13:10:55 -0000
@@ -77,24 +77,14 @@ sub collect_port_versions
{
my ($pkg, $portsdir, $notfound) = @_;
- my @subdirs = ();
- for my $subdir (keys %$pkg) {
- my ($dir) = split(/,/, $subdir);
- if (-d "$portsdir/$dir") {
- push(@subdirs, $subdir);
- } else {
- push(@$notfound, $subdir);
- }
- }
-
- my $cmd = "cd $portsdir && SUBDIR=\"".join(' ', @subdirs)
+ my $cmd = "cd $portsdir && SUBDIR=\"".join(' ', keys %$pkg)
."\" FULLPATH=Yes REPORT_PROBLEM=true make
".'show=FULLPKGNAME\${SUBPACKAGE} '
."2>&1";
my $port = {};
my $error = {};
my $count = 0;
- my $total = scalar @subdirs;
+ my $total = scalar keys %$pkg;
$state->progress->set_header("Collecting port versions");
my $fh = open_cmd($cmd);
@@ -105,6 +95,12 @@ sub collect_port_versions
$subdir = $1;
$count++;
$state->progress->show($count, $total);
+ next;
+ }
+ if (/^\>\> Broken dependency:\s+(\S+)\s+non existent/) {
+ $count++;
+ $state->progress->show($count, $total);
+ push(@$notfound, $1);
next;
}
next unless $_ or $subdir;