Dependencies calculatorPosted: 2015-04-25 Filed under: slackbuilds, system | Tags: hoorex, package, queues, slackbuilds Leave a comment
I came across this interesting discussion at LQ, introducing a new tool called HooRex (a pun for “who requires”). The program scans the SBo repository and determines dependency relations between packages in both directions:
- It can determine if a package is required by others.
- It can resolve dependencies for a given package.
The program does so by reading the
REQUIRES field in the
*.info file for each entry. The latest version of HooRex at the moment is 0.5.5 and requires pyxdg available from SBo. HooRex itself is not (yet) at SBo, so I just downloaded, unpacked the program and ran it from its folder. First, I had to point where my SBo repository was:
./hoorex -s /var/lib/sbopkg/SBo/14.1/
To check what depends on, say
muParser, just run
./hoorex muParser. Now, a few options:
-1: Show output as a single column i.e. newline separated rather than space separated
-i: Restrict output to those packages already installed, with the exception of the target package(s) which are included.
-l: Show category of each resulting package as well as the package
-m: Normally, hoorex outputs the names of packages which directly depend on the target PKG(s). In *multilevel* mode, these directly depending packages are also processed to find which packages depend on them; this process is continued until no further depending packages are found.
-r: Reverse the default calculation of dependency tree i.e. instead of determining which other packages require the target package(s), calculate which packages are required to build the target package(s).
To see what from the installed packages (option
-i) depends on
gtkmm and view the result as a list (option
bash-4.2$ hoorex -i -1 gtkmm gtkmm gbgoffice inkscape gparted
To see the dependencies of Inkscape (option -r) and present it as a list, so it makes a build queue:
bash-4.2$ hoorex -r -1 inkscape mm-common gsl libsigc++ numpy glibmm cairomm pangomm BeautifulSoup atkmm lxml gtkmm inkscape
A SlackBuild as well as packages (for Slackware 14.1-32bit and Slackware 14.1-64bit) were prepared by Nicolas Kovacs part of his Microlinux project. There is also a review of HooRex (in French).
EDIT (10 May 2015): the program is now available at SBo and the newer version does not require
pyxd any more.
In a way, HooRex is reminiscent to the package dependency graphs from SBo.