On Thu, 14 Mar 2013 16:09:24 +0100, Reindl Harald wrote:

> > I'm trying to find a standard way of finding the native packaging
> > system of a linux distribution. I'm not sure at all that testing the
> > presence of {rpm/yum}|{apt-get} is reliable as for example I can
> > install apt-get of my fedora computer.
> > 
> > So the question is, is there a simple test that can reliably determine
> > whether a linux machine is rpm or debian based for its native package
> > scheme?
> 
> presence of /var/lib/rpm
> /etc/os-release
> /etc/redhat-release

And perhaps a run-time check, such as an RPM based query, which would
only work if the RPM database is filled with details about installed
files.

  $ rpm -qa|wc -l
  1601
  $ rpm -qf /sbin/init
  systemd-198-3.fc19.x86_64
  $ rpm -qf $(which bash)
  bash-4.2.45-1.fc19.x86_64

-- 
Fedora release 19 (Rawhide) - Linux 3.9.0-0.rc2.git0.2.fc19.x86_64
loadavg: 0.05 0.18 0.22
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to