Enables binary package installations on Linux distributions. Provides functions to manage packages via the distribution’s package manager. Also provides transparent integration with R’s install.packages() and a fallback mechanism. When installed as a system package, interacts with the system’s package manager without requiring administrative privileges via an integrated D-Bus service; otherwise, uses sudo. Currently, the following backends are supported: DNF, APT.
The following dependencies are required (apart from R):
If you plan to run it as a regular user (non-root), these are required too:
Then, you should install it as a system package to be able to use it as a regular user (note sudo):
Further configuration options:
--configure-args="--without-dbus-service".--configure-vars="BUILD_ROOT=[path_to_build_root]" too.--configure-vars="PKG_PREF='prefix1- prefix2- ...'" and --configure-vars="PKG_EXCL='exclusion1 exclusion2 ...'".To enable it by default, put the following into the Rprofile.site:
Then, run install.packages as usual, and available system packages will be automatically installed.
New backends for other package managers can be added to inst/service/backend. Each backend must implement the following functions:
def discover() -> dict({ "prefixes" : list, "exclusions" : list })def install(prefixes : list, pkgs : list, exclusions : list) -> listdef remove(prefixes : list, pkgs : list, exclusions : list) -> listThe last two functions receive a list of prefixes, a list of R package names and a list of exclusions, and must return a list with those package names that could not be processed (i.e., packages not found in the system repos). Any progress should be reported to stdout.