dependency metadata can also be pretty flexible. instead of asking the package manager for the specific package name, you can do queries like
tex(fullpage.sty) or pkgconfig(libass) — you can basically put any string into the list of things a package provides, so if you need special ABI versioning and whatnot, it’s not gonna be a problem.and you can express “this package should recommend also installing package B, but only if package C is already installed or to be installed”