From ggrothendieck at gmail.com  Tue Aug 29 16:56:41 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Tue, 29 Aug 2006 10:56:41 -0400
Subject: [Rd] PATCH: Add fields argument to installed.packages and
	available.packages
In-Reply-To: <17651.65163.240840.365787@stat.math.ethz.ch>
References: <m2wt8sgyo0.fsf@ziti.fhcrc.org>
	<17651.65163.240840.365787@stat.math.ethz.ch>
Message-ID: <971536df0608290756k34136704ja820ba01487c3513@mail.gmail.com>

Rather than a plethora of fields, perhaps the Depends field could indicate
what depends on the object:  For example, if we use file extensions to
indicate what is dependent then one might write this to indicate that
some .Rd (i.e. examples) and .Rnw (i.e. vignette) files depend on lattice
and the entire package depends on zoo and the package is related to
but not dependent on tseries:

Depends: lattice (.Rd, .Rnw), grid (.Rnw), zoo, tseries (0)

Then there could be rules for each such suffix when processing
the package.

This has the advantage that its meaning is more obvious than a bunch
of keywords (Depends, Suggests, CanUse, Related).


On 8/29/06, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
> >>>>> "Seth" == Seth Falcon <sfalcon at fhcrc.org>
> >>>>>     on Mon, 28 Aug 2006 17:42:39 -0700 writes:
>
>    Seth> Hi all, The write_PACKAGES function has a 'fields'
>    Seth> argument that allows a user generating a PACKAGES file
>    Seth> to specify additional fields to include.  For
>    Seth> symmetry, it would be nice for the available.packages
>    Seth> function to be able to read those extra fields when
>    Seth> specified.
>
>    Seth> Similarly, it would be useful for installed.packages
>    Seth> to have a 'fields' argument.  This would allow a user
>    Seth> to query the set of installed packages for other
>    Seth> fields in the DESCRIPTION file.
>
>    Seth> One use for this would be for repository hosters to
>    Seth> include the License field in their PACKAGES file.  In
>    Seth> this way, end users could query a repository and only
>    Seth> download packages that they have a license to use.
>
>    Seth> Below is a patch against svn 38996 that attempts to
>    Seth> implement this.
>
> I like the idea and will look into applying the patch
> (note there's at least one typo which makes "make check" fail:
>  /priotiry/)
>
> A propos:
>
> A while back (in last summer?), we (some of R-core) have
> discussed about a new field to be added to DESCRIPTION,
> and AFAIR, the only problem we had, is to find a name we
> all liked.
> Or was there more then the name alone, and some where convinced
> that it is superfluous and hence too complicated.
>
> The idea was a field related to but weaker than 'Suggests' :
> Something like
>     'canMakeUseOf: <pkg1> [, <pkg2>, ... ]
> which is *not* used in any QA/QC checking, but is purely
> informative: If <pkg1> is require()able, then some examples may
> look nicer, a function may provide another feature, etc, etc.
> Alternatives to 'canMakeUseOf' would have been
> 'isHappilyCoworkingWith' ....
>
> What do you (R-devel listeners) think about the idea?
>
> Martin
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>




[Rd] PATCH: Add fields argument to installed.packages and available.packages
Gabor Grothendieck