[R-repo-dev] Dependencies

Allen S. Rout asr at ufl.edu
Tue Sep 28 09:58:56 EDT 2010

>> On Tue, 28 Sep 2010 14:47:41 +0200, Pierre-Yves <pingou at pingoured.fr> said:
> On Tue, 2010-09-28 at 08:38 -0400, Allen S. Rout wrote:
>> > Allen, do you still have the first version of the script to generate
>> > the order in which the packages should be built (without taking into
>> > account the "Suggests" dependencies) ?

>> Yes; All the previous links are still there; most recent, I think: 

> I was more thinking of the R script which you generated which give
> the order in which we can build the package.

That wasn't R; that was in the python.  From my notes:

# clear; R2spec  -n "Allen S. Rout" -e "asr at ufl.edu"  -c   --force  --suggests  --verbose  --package  ggplot2

This downloaded the CRAN-like lists of packages, downloaded source
tarballs, and built (and copied) the specfiles and source.  

It also generated a few dot files, including the broad and narrow
dependency graphs for the requested package.

It also generates a 'buildorderlist'; a path through the depgraph such
that each package is attempted only after its dependencies are

Other than using templates instead of assembling text by hand, The big
chunk of work in my branch of R2spec was teasing apart the different
dependencies, and storing them in a pile of Sets in cfg, and a
dependency graph.

Then, at the end of my R2spec.py, in the last loop before sys.exit, I:

while (there's still something in the depgraph)
      Look at all the keys.
          If there's something without any dependencies left,
	      add it to the build order list and script.
	      Remove that dependency from everything else in the depgraph.

> After I will just modify R2spec to add a --nocheck parameter for the
> generation of the spec file without the %check section and the
> generation of the Requirement without the "suggests".

I'm happy for you to use any of my code which you can, and to explain
what I'm doing in it.

- Allen S. Rout

More information about the R-repo-dev mailing list