Reliable way to determine native packaging system
Bryn M. Reeves
bmr at redhat.com
Fri Mar 15 09:58:43 UTC 2013
On 03/14/2013 06:27 PM, Theodore Papadopoulo wrote:
> Interesting, I'll have a look. But the downside you mention is exactly
> the one I want to avoid. Having to handle a mapping between
> distributions and packaging systems. See the other message I just
I think that's the crux of this problem: you can either approach it via
heuristics (check for presence of known package manager bits, e.g.
/var/lib/rpm etc., even make some guess about 'rpm has X packages
installed, deb has Y, X>Y: it's an RPM distro, for the unusual cases
where more than one is present), or, you have to define and maintain the
mapping by hand.
Either one could work out for a given use; it all depends on the
consequences of getting it wrong or of not having a policy available for
some environment where the tool runs.
More information about the users