Re: /etc/debian_version for Etch
On Sun, Jun 12, 2005 at 10:26:19PM -0400, Roberto C. Sanchez wrote:
> On Sun, Jun 12, 2005 at 08:12:46PM -0600, Paul E Condon wrote:
> >
> > It purports to be information that is available to script writers
> > when, if fact, it is not information. It does not, in and of itself,
> > cause a problem. It just misleads script writers into believing that
> > there is a really simple way to determine the Debian version, when in
> > fact there is not. At least not by reading this file. It would not be
> > a bug if it were totally undocumented and given another name so that
> > script writers who notice it would not assume falsely that it is
> > useful.
> >
>
> I disagree. This file is *guaranteed* to have different contents for
> every stable release. Using that file I instantly tell the difference
> between a Potato, Woody and Sarge install.
I just did a dist-upgrade of a spare box from Sarge to Etch. The contents
of /etc/debian-version was 3.1 before the dist-upgrade and remain the
same afterwards. Etch, of course, has no version number. So there is no
way to test a script that has version dependency until it is released into
stable. This is, I think, a very strange way to do business.
I conclude that all knowledgeable Debian developers do not use the contents
of /etc/debian-version. I don't know how each new Debian developer first
learns about this trap, but it is a trap, and should be eliminated, IMHO.
--
Paul E Condon
pecondon@mesanetworks.net
Reply to: