[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is there a way to positively, uniquely identify which Debian release a program is running on?

[Javier Fernández-Sanguino Peña]
> Bastille uses it to distinguish releases. There seems to be others:

Using /etc/debian_version is not a good idea.  I know this because I
tried to let popularity-contest collect its content to see what
version of Debian were in use.  Here is the list of values from

  Release: Debian                             1
  Release: testing/unstable                3670
  Release: sid                                1
  Release: stable/testing                     3
  Release: unstable                           8
  Release: testing/sarge                      1
  Release: Testing/Kriller                    1
  Release: unknown                         1323
  Release: 3.0-bunk-1                         1
  Release: "Woody                             1
  Release: special                            1
  Release: sarge                              3
  Release: woody                              1
  Release: 3.1                                2
  Release: 3.0                               53
  Release: unstable/experimental              1
  Release: debian-sid-i386                    1
  Release: 2.2                                1
  Release: unstable/testing                   1
  Release: testing                            2
  Release: Sarge                              1
  Release:                                    3

As you can see, the values varies widely.  Based on this, we decided
it was useless, and stopped collecting the value.

When that is said, I believe it is a good idea to split the Debian
version into its own package like RedHat do it, to make sure the
version can be updated without updating all the other files in
base-files.  This would make it possible to fix the version in testing
without having to fix the version of all the other files in the
base-files package in /etc/.

The redhat-release package contain these files, and it is updated for
every minor release of redhat, making it easy to track the patch level
on redhat machines:

  pre@tux ~ $ rpm -qf /etc/redhat-release
  pre@tux ~ $ rpm -ql redhat-release

Happy hacking,
Petter Reinholdtsen

Reply to: