Yeah. The ideas aren't bad, but the potential for feature-creep is enormous.
Something I think we can minimally do, that's not "dangerous" is add a
field to META that specifies a script that will test for necessary deps
and spit out a message for the user for anything that's missing. That's
the ultimate in flexibility, lets PGXN know there's at least some kind
of external dep, as well as what to run to tell the user what's missing
(if anything). If the script correctly exits non-zero on a problem pgxn
clients would know to stop.
We could possibly go a bit further though, without painting ourselves in
a corner. If you think about what a 'dependency script' would spit out
at a user, it would be:
- some common name for the package
- version restrictions (if any)
- a website to find the package at
If that data was machine-parsable, it wouldn't be hard to create
something that took the package name and/or URL and searched the
packaging system for a specific OS looking for it. Between those two
pieces of data you could probably find a unique package hit 90% of the
time or more.
Obviously this wouldn't be perfect, but it would probably suffice most
of the time.