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

Bug#592228: unblock: software-center/2.0.7debian3



On Di, 2010-08-10 at 15:42 +0200, Philipp Kern wrote:
> Julian,
> 
> On 08/08/2010 04:13 PM, Julian Andres Klode wrote:
> > You can't use /etc/debian_version to get reliable information, as even
> > on Ubuntu:
> >    
> 
> I don't care about Ubuntu on this one.  You made local modifications to 
> the file for Debian anyway.
version.py is autogenerated in setup.py, using the values from the
changelog (and lsb_release).

> 
> > (lucid)jak@jak-thinkpad:/$ cat /etc/debian_version
> > squeeze/sid
> >
> >    
> 
> However that file is updated in Debian stable for every point release.  
> But then the right thing would be to use `lsb_release -r' anyway?  For 
> me on squeeze/sid it says "testing" and on stable it says "5.0.5".
We use lsb_release for almost anything. Those values are only used for a
browser string when fetching images from screenshots.debian.net, and
looks like:
    "Software Center/2.0.7debian3 (N;) Debian/unstable (unstable)"

I can change this, to use lsb_release:
(stable)   "Software Center/2.0.7debian4 (N;) Debian/6.0 (squeeze)" 
(testing)  "Software Center/2.0.7debian4 (N;) Debian/testing (squeeze)" 
(unstable) "Software Center/2.0.7debian4 (N;) Debian/unstable (sid)"

The version.py file would look like:
  import commands
  VERSION='2.0.7debian4'
  CODENAME=commands.getoutput("lsb_release -s -c")
  DISTRO=commands.getoutput("lsb_release -s -i")
  RELEASE=commands.getoutput("lsb_release -s -r")

Do you want this?
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.





Reply to: