From 13ae75011982063640f369c29bcd65a02b5a1325 Mon Sep 17 00:00:00 2001
From: André Erdmann
-
-
-
+
+
-
-
argparse (http://code.google.com/p/argparse)
setuptools (http://pypi.python.org/pypi/setuptools)
+rsync (for using rsync repositories)
for Manifest creation:
Expect 3-6h execution time for the first run, depending on computing +
Expect 1h execution time for the first run, depending on computing and I/O speed. roverlay is able to work in incremental mode, thus making subsequent runs need a lot less time.
The config file is a text file with '<option> = <value>' syntax. Some options accept multiple values (e.g. <option> = file1, file2), in which case the values have to be enclosed with quotes (-> <option> = "file1 file2").
+If roverlay has been installed, then emerge --config roverlay can be +used to set up the config file as well as to create essential directories. +It can be run multiple times in order to configure roverlay for more than +one user.
+Important
+emerge --config roverlay will overwrite the user's config file (or +/etc/roverlay/R-overlay.conf when configuring for root).
+The following options should be set before running roverlay:
@@ -761,6 +779,10 @@ Leaving this option as-is (enabled) is recommended if you want to use DISTDIR as package mirror.
Example: DISTDIR_FLAT = yes
Portage directory, which is used to scan for valid licenses.
+Example: PORTDIR = /usr/portage
+There is another option that is useful for creating new dependency rules, @@ -978,6 +1000,9 @@ while those from 'Suggests' are optional)
immediately stop processing p if a required dependency cannot be resolved in which case a valid ebuild cannot be created
+verify dependencies on packages found in the overlay, whether their +ebuilds already exist or not (selfdep validation)
See also: Dependency Resolution
Ebuilds imported that way can not be overwritten by generated ebuilds and benefit from most overlay creation features, e.g. Manifest file creation. However, they cannot be used for metadata creation.
-Important
-Importing ebuilds is only supported by the default Manifest implementation -(ebuildmanifest).
-The dependency type can also be a comma-separated list of the listed types. +Actually, all is an abbreviated version of pkg,sys. +Specifying selfdep alone does not resolve anything.
+Hint
+Check the dependency type if a newly added rule has no effect.
+The other keyword is #! NOPARSE which stops parsing of a rule file.
This is another name for dependency strings that are resolved by an -R package with the same name, which is also part of the overlay being -created.
-Example: zoo is resolved as sci-R/zoo, assuming that OVERLAY_CATEGORY -is set to sci-R
-Writing selfdep rules is not necessary since roverlay automatically -creates rules for all known R packages (see Dynamic Selfdep Rule Pool -for details).
+This is a classification for dependencies on packages which are also part +of the overlay being created. Typically, selfdeps refer to other R +packages, but there may be a few exceptions.
+roverlay validates selfdeps during overlay creation, which is the most +significant difference to non-selfdeps.
+Selfdep rules can be written by prefixing a single rule with @selfdep +(in a separate text line) or by adding selfdep to the dependency rule +type.
+There is a second variant of selfdeps, true selfdeps, which resolve +a dependency string as R package with the same name.
+Example: zoo is resolved as sci-R/zoo, assuming that +OVERLAY_CATEGORY is set to sci-R.
+Writing such selfdep rules is not necessary since roverlay automatically +creates rules for all known R packages at runtime (see +Dynamic Selfdep Rule Pool for details).
There are a few exceptions to that in which case selfdep rules have to be written:
Caution!
-Writing unnecessary selfdep rules slows dependency resolution down! -Each rule will exist twice, once as dynamic rule and once as +
Writing unnecessary true selfdep rules slows dependency resolution +down! Each rule will exist twice, once as dynamic rule and once as the written one.
Directory for persistent files that don't belong to the overlay, e.g. the distmap file.
-This option is required.
-<<TODO: default value!>>
+This option is required.
Sets the implementation that will be used for Manifest file writing. -Available choices are ebuild, portage, default and none. -Defaults to default (-> ebuild). -portage is highly experimental and therefore not recommended -for production usage.
+Available choices are ebuild, next, default and none. +Defaults to default (-> next). +next is an mostly internal implementation that is considerably faster +than ebuild. ebuild is still used when creating Manifest files for +imported ebuilds.
Note
Choosing 'none' is destructive - roverlay will fail to function @@ -3263,6 +3294,12 @@ by ',' and/or ';'.
Roverlay provides an API for accessing its functionality independently of +R overlay creation. Only dependency resolution is available, currently.
+Note, however, that a minimal config file may still be required for accessing +roverlay interfaces.
+The table below lists all interfaces and where to find them:
+name | +module | +description | +
---|---|---|
RootInterface | +roverlay.interface.root | +meta interface for managing +other interfaces | +
MainInterface | +roverlay.interface.main | +RootInterface with delayed +initialization | +
DepresInterface | +roverlay.interface.depres | +dependency resolution | +
For extending the API, roverlay provides the abstract RoverlayInterface and +RoverlaySubInterface classes.
+The DepResInterface offers the following functionality:
+Refer to in-code documentation on how to use this interface. +See the dependency resolution test suite for a usage example +(tests.depres, not part of the roverlay installation). +(The depres console is also a candidate for using this interface in future.)
+This chapter gives an in-depth overview of how roverlay works. Code documentation is also available and html pages for it can be created with make pydoc in the R Overlay src directory or by using pydoc directly.
PackageInfo is the data object that contains all information about an R package and is created by the owning repository.
After initialization it contains data like
@@ -3506,7 +3608,7 @@ for it. Otherwise, p is now part of the overlay and has to pass ebuild creation.Repositories are managed in a list-like object, RepoList. Its task is to provide R package input for overlay creation and implements the following functionality:
@@ -3517,7 +3619,7 @@ functionality:The functionality described above is an abstraction layer that calls the respective function for each repository and collects the result. So, while the RepoList object knows what to do for all repositories, @@ -3558,7 +3660,7 @@ subclass-specifc _sync()/_nosync() functions if available. repository types, rsync, websync_repo and websync_pkglist derive from BasicRepo.
Adding new repository types is best done by creating a new repo class that inherits BasicRepo. The table below shows BasicRepo's subclass awareness concerning sync() and what may be changed if required. @@ -3645,7 +3747,7 @@ to be accessible.
The overlay is roverlay's central data structure that represents a portage overlay. It is organized in a tree structure (overlay root, categories, package directories) and implements all overlay-related functionality:
@@ -3676,7 +3778,7 @@ levelmetadata.xml files are created with a tree structure that contains metadata nodes, e.g. '<pkgmetadata>...</pkgmetadata>' and '<use>...</use>' are nodes. The current implementation writes the R package's full description @@ -3685,16 +3787,21 @@ Metadata creation uses the latest package, i.e. highest version, for which an ebuild has been created.
Manifest files are created by calling the ebuild executable for each -package directory in a filtered environment where FETCHCOMMAND and -RESUMECOMMAND are set to no-operation. The directories that contain the R -package files are passed in the PORTAGE_RO_DISTDIRS variable and DISTDIR -is set to DISTFILES_ROOT/__tmp__.
+Two implementations for writing manifest files are available, ebuild and +next.
+The ebuild implementation calls the ebuild executable for each package +directory in a filtered environment where where FETCHCOMMAND and +RESUMECOMMAND are set to no-operation (/bin/true on systems that support it).
+next is an internal implementation that uses the +roverlay.overlay.pkgdir.manifest module for creating Manifest files. +It falls back to ebuild when creating Manifest entries for imported ebuilds, +since roverlay does not support reading SRC_URI from ebuilds reliably (that +would require variable interpolation, e.g. for ${PN}).
Ebuild creation is the process centered around one PackageInfo instance p that tries to create an ebuild for it.
It does the following steps:
@@ -3702,6 +3809,13 @@ that tries to create an ebuild for it.Each ebuild variable is an object whose class is derived from the EbuildVar class. An EbuildVar defines its position in the ebuild and how its text output should look like. Ebuild text is created by adding ebuild variables @@ -3721,7 +3835,7 @@ to an Ebuilder that automatically sorts them and creates the ebuild.
Overlay creation is the process of creating an overlay for many R packages and roverlay's main task. More specifically, OverlayCreation is an R packages -> Overlay (-> overlay in filesystem) interface. @@ -3733,9 +3847,13 @@ for a PackageInfo object and inform the OverlayCreation about afterwards. Overlay creation keeps going if an ebuild cannot be created, instead the event is logged. Running more than one OverlayWorker in parallel is possible.
+<<TODO: specify algo here>>
+Each ebuild creation process has access to the dependency resolver that accepts dependency strings, tries to resolve them and returns the result, either "unresolvable" or the resolving dependency as @@ -3757,7 +3875,7 @@ all required dependencies. No ebuild can be created in that case.
Details about dependency resolution like how channels work can be found in the following subsections.
Every dependency string has a dependency type that declares how a dependency should be resolved. It has one or more of these properties:
The DESCRIPTION file of an R package contains several fields that list dependencies on R packages or other software like scientific libraries. This section describes which dependency fields are used and how.
@@ -3845,7 +3969,7 @@ but optional dependencies during the pkg_postinst() ebuild phase.A dependency environment is an object that reflects the whole dependency resolution process of a single dependency string. It usually contains the dependency string, its dependency type, information about its @@ -3855,7 +3979,7 @@ resolving resolving dependency, if any.
dependency resolver.The EbuildJob Channel is used by the ebuild creation to communicate with the dependency resolver. It is initialized by an ebuild creation process and realizes a greedy string to string dependency resolution.
@@ -3892,7 +4016,7 @@ dependencies are unresolvable.The dependency resolver does not know how to resolve a dependency string. Instead, it searches through a list of dependency rule pools that may be able to do this.
@@ -3910,12 +4034,12 @@ consist of rules that exist in memory only. These are called Dynamic Rule Pools and use runtime data like "all known R packages" to create rules.roverlay uses one dynamic rule pool, the Dynamic Selfdep Rule Pool. -This pool contains rules for all known R packages and is able to resolve -R package dependencies. +This pool contains selfdep rules for all known R packages and is able +to resolve R package dependencies. By convention, it will never resolve any system dependencies.
The dependency resolver can be extended by modules. Two base types are available, channels and listeners.
The dependency resolver puts all parts of dependency resolution together, rule pools, listeners and channels. Its main task is a loop that processes all queued dependency environments and sends the result back to @@ -3993,7 +4117,7 @@ becomes "loop until resolver closes".