Testing of HooRex (SlackBuilds.org dependency calculator)
Could people please test a new dependency calculator please? I'd appreciate any comments, bug reports etc., prior to a proper release. Its at https://github.com/cwilling/hoorex
It started out as a way to find out which SBo packages would be affected by a change to one package in particular e.g. if package "speex" changes, which other packages might be affected? Simplistically, the answer is found by determining all the SBo packages which list speex in the REQUIRES field of their .info file. A "find" command run over a local copy of the SBo repo will give an answer. However that answer needs some human interpretation - it is no good, the way it is, as input to some other script that I may want to use. Also, that answer only gives a single "level" of packages which require speex. Surely (possibly, at least) there will be other packages which depend on that first load of dependent packages. Who knows how long the trail of dependencies may be? HooRex answers this question (and others). hoorex speexwill return a list of packages which name speex as a direct dependency (they list speex in their .info file). Running: hoorex -m speexwill return an extended list of dependent packages i.e. it also includes packages which depend on the first level of dependents, also packages which depend on the dependents' dependents etc., etc. The output is always listed in "build order" i.e. it works as a queue that you could supply to some build tool. You can specify multiple packages to resolve just by adding their names to the command line. A -l (--long) option includes the SBo package category in the output making it easier to be use in a shell script to automate the building/installation of all the relevant packages. A simple minded example using json-c and speex: Code:
cd /path/to/slackbuilds hoorex -r vlcAll the available HooRex options are shown from: hoorex -hand there's a man page too. The source tarball is available in releases tab of the link above - at the moment, the direct link to it is https://github.com/cwilling/hoorex/archive/0.5.3.tar.gz (use "wget --content-disposition ..." for a fully named tarball). Just run make install (as root) to install the hoorex script (python) and manpage. The pyxdg package (available at SBo) is a run time dependency. As I already said, I'm looking for comments, bug reports etc., anything to make HooRex more accurate and robust. Thanks for your time. chris |
Hi,
I tested it and seems to work here :) I have two suggestions: Would it be possible to add a -i option, so that only the installed packages show up? For example, Code:
$ test/usr/bin/hoorex gtkmm Code:
$ bin/asbt.sh -e --rev gtkmm Thx. |
Thanks for the suggestions aaditya. They both seem feasible and I'll add them in the next few days.
chris |
I've pushed out a 0.5.4 version which contains the enhancements suggested by aaditya, along with fixes for some minor bugs I found along the way. Any more feedback would be greatly appreciated.
The direct link to the source tarball is https://github.com/cwilling/hoorex/archive/0.5.4.tar.gz or clone the repo from https://github.com/cwilling/hoorex.git |
Seems to work as expected, thx :)
Code:
$ ./hoorex -i gtkmm Code:
$ ./hoorex -r -1 gparted |
chris.willing,
this is great. Is there a way for it to distinguish between packages installed from SlackBuilds.org and those from other sources? |
Quote:
hoorex line 21 Code:
HOOREX_VERSION = '0.5.3' |
seems the Makefile takes care of it
https://github.com/cwilling/hoorex/c...05983988241fe4 BTW, thanks Chris for this! |
Quote:
BTW something similar to what you tested as above (first find who requires gtkmm, then find build order for one of them) can be done using a hoorex pipeline - it feeds output of first hoorex instance as input to a second hoorex instance e.g. Code:
hoorex -i gtkmm | hoorex -r -1 Thanks again for your suggestions - restricting output to packages already installed is very useful. chris |
This looks like a very interesting and useful project. I'm curious: why the name HooRex?
|
Quote:
Something I have in mind (and partially implemented already) is to enable the initial index building to use something other than the REQUIRES field of the .info files. Some people already enhance their local .info files with additional build requirements to suit how they like particular packages built. This can be done by adding to the existing REQUIRES field; however this leads to lots of additional work when merging SBo updates (pretty much weekly, recently). I personally add an extra field PREREQS at the very end of the .info file. In the PREREQS field, I add whatever additional packages I want along with $REQUIRES e.g. Code:
PREREQS="$REQUIRES foo bar" The reason to go through all that is to suggest that the current hoorex mechanism to index the dependencies of an SBo repo may be adaptable to other repositories. Provided those other repos have a consistent strategy for registering dependency information, hoorex could probably parse them too. Do you have a particular "other" source in mind? chris |
Quote:
Its interesting you noticed that in the first place - you must be reading the code:study:. Hope there's nothing too ugly in there ... chris |
Quote:
chris |
Quote:
HooRex is a corruption of "who requires", so that running 'hoorex gtkmm' is like asking 'who requires gtkmm'. I guess it makes packages seem to have some human aspect; maybe 'what requires ..." would be more accurate but whatrex (or wotrex) doesn't roll off the tongue quite as well. I hope it doesn't mean something awful in french ... chris |
Well if you're going to take the approach of having what you call a 'cache', you'd be better off using a proper sqlite database -- then your complex queries are just trivial SQL. And then you can keep all sorts of other useful things in there.
cf. https://github.com/idlemoor/slackrep...ctions.sh#L401 and https://github.com/idlemoor/slackrep...ctions.sh#L479 |
All times are GMT -5. The time now is 06:07 PM. |