On 2007/12/05 09:37, J.C. Roberts wrote:
> 
> Unfortunately, using `make show-required-by` on the right-most doesn't
> really show all of the dependencies because it skips REGRESS_DEPENDS.
> 
> In case of a regression on a regression, I take a more aggressive
> approach to finding all the dependencies, including REGRESS_DEPENDS.
> 
>   $ cd /usr/ports
>   $ find . -type f -name 'Makefile' -exec sh -c 'if [ X`grep -l \
>   > p5-whatever "{}"` == X"{}" ]; then echo {}; fi' \;

ouch :-) If you need to ask this sort of question of the ports tree,
take a look in the direction of sqlports. I get the impression this is
seldom used, but it's a really nice tool. Takes a while to build the
db (and a good way to notice Cs in your ports tree :) but you can
just grab the tgz from a package snapshot.

$ time echo ".headers on
    select * from depends where dependspath = 'devel/p5-Test-Warn';" \
    | sqlite3 /usr/local/share/sqlports 
FULLPKGPATH|FULLDEPENDS|DEPENDSPATH|TYPE
net/p5-Net-Radius|::devel/p5-Test-Warn|devel/p5-Test-Warn|Regress
www/p5-WWW-Mechanize|::devel/p5-Test-Warn|devel/p5-Test-Warn|Regress
    0m0.11s real     0m0.03s user     0m0.07s system

I find it's helpful to use a query browser GUI while working out
how to ask questions; sqliteman works well for me (then, half the time,
I end up going back to the CLI and feeding the output into a shell
script.. not exactly "the SQL way" but it gets the job done).

> The above gives me everything touched by a port, including the 'stated'
> regression test dependencies. Unfortunately, it doesn't give me the
> unstated (in the port Makefile) dependencies.

I think the only way to pick those up is to walk through each port
doing "pkg_delete /var/db/pkg/*; make regress", I'll try and do some
of this when I have reduced my to-do list a bit!

> It would be nice if I could automate the tree walking for regression
> failures, but some stuff in the tree never passes regression tests, for
> example, p5-Net-SSLeay just hangs.

I just had a look at this, it forks and execs sslecho.pl, but this
never exits, so the test doesn't complete. This is broken, it should
at least be REGRESS_IS_INTERACTIVE if not NO_REGRESS until someone
works out how to fix it (I tried adding another kill but that didn't
do the trick, haven't thought of anything else to try yet).

Reply via email to