If anyone is interested - here is a version extracted from svn of dependency.inc. There are example uses in drpkg.
It provides an api to parse and process dependency info - no storage - that is a separate concern. You have a tree walker with callbacks + a bunch of cosmetic functions.
It is generally self-explanatory.