Open thestr4ng3r opened 6 years ago
r2pm can just record something like "~/.config/radare2/plugins.json" every time it installs or removes a plugin and r2 load this file for example.
That would be an alternative, yes.
I also thought it might make sense to have the possibility to run r2pm like r2pm -env
or something and it outputs a json to stdout with all the needed info. This could then be parameterized like r2pm -env cutter
to get everything relevant for cutter.
@radare @Maijin @qbarrand what do you think about this one?
Hard to say. I would avoid putting a dependency on r2pm
, but I also see that having the same file provided by two packages could be a source of problems (this is forbidden by RPM, for example). Your call.
Old r2pm installs r2 plugins directly in the global plugin directory.
What if new r2pm would install packages only in a self-contained directory and then can give you a list of paths for LIBR_PLUGINS, so r2 can find all the plugins? Of course this implies that r2 has to either query r2pm for the paths itself or you have to manually run r2 with env vars given by r2pm.
This would make it more transparent to the user where files from a package are installed. And if you have a binary package (e.g. for Windows), it would be enough to unpack it and set the paths. Also, for Cutter plugins, r2pm would not need to know where Cutter is installed and gets its plugins from, but only Cutter needs to know where r2pm is.