cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dependencies between "build" and "dist"


From: Rajesh Vaidheeswarran
Subject: Re: Dependencies between "build" and "dist"
Date: Mon, 06 Aug 2001 19:25:48 -0400 (EDT)

The problem with pkgmk is that it is intolerant to random files within
the directory that it created (or rather that it is planning to update. It
knows the files that should belong there, and I believe it does the
equivalent of rm of all the files and a rmdir of the directory - the
latter will fail when there is an extraneous file. Maybe with Solaris 8,
sun has actually made the behavior better, or configurable through a flag.)

This means, you cannot leave extraneous files inside the final destination,
since a genuine invocation of pkgmk will fail when it attempts to rm the
directory and lay out the new package files on the filesystem.

In a previous message, Steven Knight writes:

> > The issue for Arun is that pkgmk in solaris creates a directory as its
> > final output. This is particularly irritating in the cons view of the world
> > since we expect file targets for dependency checking. I had a conversation
> > with Bob previously on this very same issue, and there was no good way to
> > make cons (make .. cons) depend on a directory (or create a directory as it
> s
> > target.)
> 
> I've been gradually nudging the dependency code towards treating files
> and directories exactly the same for dependency purposes, so we're
> actually a lot closer today than we used to be to being able to make a
> directory a target.  Maybe it's time to just work through and finish the
> code for that effort.
> 
> For purposes of building a target, though, I've usefully worked around
> this limitation by having the target of the Command be a dummy target
> file that gets touched as the last command executed--for Arun's case,
> something like:
> 
>       Command $env
>           "$DIST/$PKG/.pkgmap_updated",
>           "$prototype",
>           ["pkgmk -o -d $dest_dir -f %1 -p $version -v $product_info " .
>               "INSTALL_DIR=$BUILD_ROOT $PKG",
>            "touch %>"];
> 
> This assumes that pkgmk will return a failed exit code, in which case
> Cons will not execute the touch and not update the .consign signature
> for the dummy target file.  If you really need the target dir listed,
> you can tell the Command that it's "building" multiple targets:
> 
>           ["$DIST/$PKG/.pkgmap_updated",
>               "$DIST/$PKG/pkgmap"]
> 
> I don't think that should make a difference, though.
> 
>       --SK
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]