Subject: CVS commit: pkgsrc/mk
To: None <>
From: Frederick Bruckman <>
List: pkgsrc-changes
Date: 02/28/2002 16:42:41
Module Name:	pkgsrc
Committed By:	fredb
Date:		Thu Feb 28 14:42:40 UTC 2002

Modified Files:

Log Message:
Comprehensive update to the fetch-list target (and friends), incorporating
many suggestions made by Bernd Ernesti on "tech-pkg". Closes PR pkg/15539.

- - Partially revert 1.895, which made 'fetch-list' ape 'fetch', so instead
    check if a file exists on the building host before emitting anything
    for it into the generated script. Update to use the new 'fetch' procedure
    on the fetching host, once it is determined that the file is needed,
    and generally clean up the output, so that it's a human readable shell
    script with comments.
- - Introduce utility target 'show-all-depends-dirs', to do the necessary
    recursing over dependencies quickly and correctly. Add a couple of
    variations to show how it's done, and bracket the whole thing with
    ".if make()", so it's invisible to the dependency graph for all the
    other targets. The key improvement over the old way, is that it utilizes
    an "awk" associative array to guarantee that no package subdirectory
    is visited twice. For the package with the hairiest dependency graph,
    "x11/gnome", this leads to something like a 1,000-fold improvement!
- - "sort -u" over the result of 'fetch-list-one-pkg' goes bye-bye. The new
    "awk" post-processor begins emitting output as soon as there is a file
    to fetch, so the user doesn't have to wait for the whole thing to finish
    before he sees anything.
- - Get rid of the old hook for non-recursing for a top-level 'fetch-list',
    which was never used. Previously, a top-level 'fetch-list' couldn't work
    anyway, because the progress reports ruined the shell script. Remove
    'fetch-list' from the targets that recurse from the top, and instead
    use a different 'fetch-list' target in "" to do the right
    thing. Currently, that right thing includes recursing in the single-category
    case, or if ${SPECIFIC_PKGS} is set, and not recursing in the top-level,
    all packages case (where it would be perfectly pointless).

To generate a diff of this commit:
cvs rdiff -r1.932 -r1.933 pkgsrc/mk/
cvs rdiff -r1.45 -r1.46 pkgsrc/mk/

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.