%*RESOURCES
as a dynamic variable gives you access to every one of the Distribution::Resource
objects within a specific distribution. These objects are installed along with it, so they're just there, available.
However, I can't find a documented, not to mention specced way, to access from one distribution the resources of a different one. Say, for instance, you want to access from Foo
the data installed as resource for distribution Bar
. I can imagine instantiating a Distribution::Resources
object; in order to instantiate that, you need the repo
(OK, I can live with that), but then the dist-id
. There's very possible a spec way to obtain dist-id from dist-name... But I get lost here. Can anyone help?
Update: I'm checking this out, and it boils down to: use zef
. It includes logic for "finding" where a "identity" (distro identified by name and meta data) is located, and from there you can probably locate the ID by parsing output. However, no documentation there and not clear either what's the public API for it, other than it might be somewhere in this code.
It's entirely clear, however, that first you have to locate the distribution you need the resources, from where you will obtain an ID, and then use that ID to instantiate the object above. Ish.