You and I are talking about two different things.

You're talking about a mechanism that explicitly encodes file
dependencies in the manifest.  This is orthogoal to the current
discussion.

Everbody else is talking about a way to specify a file dependency in a
package definition and have that translated to a pkg dependency in the
manifest.

-j

On Wed, Jun 04, 2008 at 03:34:54AM +0530, Venky wrote:
> On Tue, Jun 03, 2008 at 02:36:42PM -0700, [EMAIL PROTECTED] wrote:
> > > However, one problem with this is that it creates a situation where
> > > you are publishing a package that depends on a file in a package that
> > > hasn't been published yet.
> > 
> > How is this any different from the behavior that we have today?  I can
> > write a package with a dependency on a package that isn't in the
> > repository. At least in the current code, we don't require that that the
> > dependent packages be present in the catalog.
> 
> Precisely.
> 
> > We're talking about a mechanism that allows the developer to
> > specify a file name, and if possible, get that translated to a package
> > dependency.  This needs to happen at publication time;
> 
> Does this need to happen at publication time?  I haven't looked at
> that part of the server code, but logically, there should be no
> reason for this to happen at publication time.  The client should be
> able to handle a file-based dependency just like it handles
> FMRI-based ones right now.  I could, in fact, simulate a poor-man's
> version of this with the tools available right now:
> 
> ---
> 
> # Assuming that file dependencies are specified as "depend file=..."
> 
> PKGNAME=<package-to-install>
> DEPFILES=$( pkg contents -m "$PKGNAME" \
>           | sed -n '/depend file=/s/^.*file=\([^ ]*\).*$/\1/p' )
> DEPPKGS=
> for FILE in $DEPFILES; do
>     # TODO: Filter multiple results and pick the best match
>     DEPPKGS="$DEPPKGS $( pkg search "$FILE" | tail +2 | awk '{print $NF}')"
> done
> pkg install $DEPPKGS "$PKGNAME"
> 
> ---
> 
> That should do it, I guess.
> 
> Venky.
> _______________________________________________
> pkg-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to