Who should be generating lists of files?

Ian Lynagh igloo at earth.li
Fri May 11 12:28:31 EDT 2007

On Thu, May 10, 2007 at 10:53:20PM -0700, Bryan O'Sullivan wrote:
> As part of cabal-rpm, I'd like to be able to package up profiling 
> versions of libraries in a separate system-level package from normal 
> libraries, to reduce bloat.

Agreed; for Debian we'd ideally have

    ./Setup copy --dev
    ./Setup copy --prof
    ./Setup copy --doc

to copy the "normal" libraries, the profiling libraries and the haddock
docs respectively.

> What's the best way for me to get a list of the files that would be 
> installed by Setup copy, and determining which are profiling files vs 
> normal?  Should I be faking this up inside cabal-rpm, or pushing the 
> knowledge out to Cabal itself?

There could then also be a --list-files flag which only lists which
files it would install (presumably you'd first run "./Setup copy" to put
them all in place, and then "./Setup copy --list-files --dev" etc to
find out which files you need to take for which package).

In case it is helpful, what I currently do is:

    PROF_FILE = \( -name "*.p_*" -o -name "lib*_p.a" \)

    # dev files:
    find tmp/usr/lib -type f ! $(PROF_FILE)
    find tmp -type d -empty

    # prof files:
    find tmp/usr/lib -type f   $(PROF_FILE)

    # doc files:
    echo "tmp/usr/share/*/doc/html/*"


More information about the cabal-devel mailing list