Bug#681598: /usr/share/pyshared/lsb_release.py: release detection fails with http.debian.net redirector in sources.list

2012-07-20 Thread Nikolaus Rath
On 07/15/2012 06:35 PM, Nikolaus Rath wrote:
 On 07/15/2012 03:47 PM, Jeff Licquia wrote:
 On 07/14/2012 11:45 AM, Nikolaus Rath wrote:
 When using the http.debian.net redirector, though

 | deb-src http://http.debian.net/debian/ testing main contrib non-free
 | deb http://http.debian.net/debian/ testing main contrib non-free

 the detection fails:

 Cannot duplicate on my system:

 
 jeff@virtpc-wheezy:~$ python
 Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
 import lsb_release
 lsb_release.get_distro_information()
 {'DESCRIPTION': u'Debian GNU/Linux testing (wheezy)', 'RELEASE':
 u'testing', 'CODENAME': 'wheezy', 'OS': 'GNU/Linux', 'ID': 'Debian'}

 jeff@virtpc-wheezy:~$ cat /etc/apt/sources.list

 deb http://http.debian.net/debian/ testing main contrib non-free
 deb-src http://http.debian.net/debian/ testing main contrib non-free

 #deb http://security.debian.org/ testing/updates main contrib non-free
 #deb-src http://security.debian.org/ testing/updates main contrib non-free

 #deb http://ftp.uwsg.indiana.edu/linux/debian/ wheezy-updates main
 contrib non-free
 #deb-src http://ftp.uwsg.indiana.edu/linux/debian/ wheezy-updates main
 contrib non-free
 jeff@virtpc-wheezy:~$
 

 One potential issue I did find: lsb_release did get quite confused when
 I changed sources.list but did not apt-get update afterwards.  Can you
 check that and see if apt-get update makes a difference?
 
 Indeed, when trying on the command line it works after I do an explicit
 apt-get update.
 
 I'm confused why I'm getting the error mail from unattended-upgrades
 though. I would think that apt-get update is ran before that.
 
 
 I'll send an update if the error shows up again.

Reporting back with the same problem:

/etc/cron.daily/apt:
Traceback (most recent call last):
  File /usr/bin/unattended-upgrade, line 55, in module
DISTRO_CODENAME = lsb_release.get_distro_information()['CODENAME']
KeyError: 'CODENAME'

I reproduced on a terminal, but after an explicit apt-get update, the
problem goes away. sources.list hasn't been touched at all.


Could there be some other cronjob that cleans up the information used by
lsb_release every once in a while?



Best,


   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#681598: /usr/share/pyshared/lsb_release.py: release detection fails with http.debian.net redirector in sources.list

2012-07-15 Thread Jeff Licquia
On 07/14/2012 11:45 AM, Nikolaus Rath wrote:
 When using the http.debian.net redirector, though
 
 | deb-src http://http.debian.net/debian/ testing main contrib non-free
 | deb http://http.debian.net/debian/ testing main contrib non-free
 
 the detection fails:

Cannot duplicate on my system:


jeff@virtpc-wheezy:~$ python
Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
 import lsb_release
 lsb_release.get_distro_information()
{'DESCRIPTION': u'Debian GNU/Linux testing (wheezy)', 'RELEASE':
u'testing', 'CODENAME': 'wheezy', 'OS': 'GNU/Linux', 'ID': 'Debian'}

jeff@virtpc-wheezy:~$ cat /etc/apt/sources.list

deb http://http.debian.net/debian/ testing main contrib non-free
deb-src http://http.debian.net/debian/ testing main contrib non-free

#deb http://security.debian.org/ testing/updates main contrib non-free
#deb-src http://security.debian.org/ testing/updates main contrib non-free

#deb http://ftp.uwsg.indiana.edu/linux/debian/ wheezy-updates main
contrib non-free
#deb-src http://ftp.uwsg.indiana.edu/linux/debian/ wheezy-updates main
contrib non-free
jeff@virtpc-wheezy:~$


One potential issue I did find: lsb_release did get quite confused when
I changed sources.list but did not apt-get update afterwards.  Can you
check that and see if apt-get update makes a difference?


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#681598: /usr/share/pyshared/lsb_release.py: release detection fails with http.debian.net redirector in sources.list

2012-07-15 Thread Nikolaus Rath
On 07/15/2012 03:47 PM, Jeff Licquia wrote:
 On 07/14/2012 11:45 AM, Nikolaus Rath wrote:
 When using the http.debian.net redirector, though

 | deb-src http://http.debian.net/debian/ testing main contrib non-free
 | deb http://http.debian.net/debian/ testing main contrib non-free

 the detection fails:
 
 Cannot duplicate on my system:
 
 
 jeff@virtpc-wheezy:~$ python
 Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
 import lsb_release
 lsb_release.get_distro_information()
 {'DESCRIPTION': u'Debian GNU/Linux testing (wheezy)', 'RELEASE':
 u'testing', 'CODENAME': 'wheezy', 'OS': 'GNU/Linux', 'ID': 'Debian'}

 jeff@virtpc-wheezy:~$ cat /etc/apt/sources.list
 
 deb http://http.debian.net/debian/ testing main contrib non-free
 deb-src http://http.debian.net/debian/ testing main contrib non-free
 
 #deb http://security.debian.org/ testing/updates main contrib non-free
 #deb-src http://security.debian.org/ testing/updates main contrib non-free
 
 #deb http://ftp.uwsg.indiana.edu/linux/debian/ wheezy-updates main
 contrib non-free
 #deb-src http://ftp.uwsg.indiana.edu/linux/debian/ wheezy-updates main
 contrib non-free
 jeff@virtpc-wheezy:~$
 
 
 One potential issue I did find: lsb_release did get quite confused when
 I changed sources.list but did not apt-get update afterwards.  Can you
 check that and see if apt-get update makes a difference?

Indeed, when trying on the command line it works after I do an explicit
apt-get update.

I'm confused why I'm getting the error mail from unattended-upgrades
though. I would think that apt-get update is ran before that.


I'll send an update if the error shows up again.

Thanks!

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#681598: /usr/share/pyshared/lsb_release.py: release detection fails with http.debian.net redirector in sources.list

2012-07-14 Thread Nikolaus Rath
Package: lsb-release
Version: 4.1+Debian7
Severity: normal
File: /usr/share/pyshared/lsb_release.py

With the following sources.list:

| deb-src http://mirror.cc.columbia.edu/debian/ testing main contrib non-free
| deb http://mirror.cc.columbia.edu/debian/ testing main contrib non-free

the output of lsb_release.get_distro_information is correct:

In [4]: lsb_release.get_distro_information()
Out[4]: 
{'CODENAME': 'wheezy',
 'DESCRIPTION': u'Debian GNU/Linux testing (wheezy)',
 'ID': 'Debian',
 'OS': 'GNU/Linux',
 'RELEASE': u'testing'}


When using the http.debian.net redirector, though

| deb-src http://http.debian.net/debian/ testing main contrib non-free
| deb http://http.debian.net/debian/ testing main contrib non-free

the detection fails:

In [3]: lsb_release.parse_apt_policy()
Out[3]: 
[(100, {'suite': u'now'}),
 (500,
  {'component': u'',
   'label': u'Jitsi Debian packages repository',
   'origin': u'jitsi.org',
   'suite': u'unstable'}),
 (100,
  {'component': u'non-free',
   'label': u'Unofficial Multimedia Packages',
   'origin': u'Unofficial Multimedia Packages',
   'suite': u'testing',
   'version': u'None'}),
 (100,
  {'component': u'main',
   'label': u'Unofficial Multimedia Packages',
   'origin': u'Unofficial Multimedia Packages',
   'suite': u'testing',
   'version': u'None'}),
 (500,
  {'component': u'non-free',
   'label': u'Debian',
   'origin': u'Debian',
   'suite': u'testing'}),
 (500,
  {'component': u'contrib',
   'label': u'Debian',
   'origin': u'Debian',
   'suite': u'testing'}),
 (500,
  {'component': u'main',
   'label': u'Debian',
   'origin': u'Debian',
   'suite': u'testing'})]


This is annoying, because when using ${distro_codename} in 
/etc/apt/apt.conf.d/50unattended-upgrades, 

Unattended-Upgrade::Origins-Pattern {
o={distro_id},a=${distro_codename};
o={distro_id},a=${distro_codename}-updates;
o={distro_id},a=${distro_codename},l=Debian-Security;
};


unattended-upgrades fails with

Traceback (most recent call last):
  File /usr/bin/unattended-upgrade, line 55, in module
DISTRO_CODENAME = lsb_release.get_distro_information()['CODENAME']
KeyError: 'CODENAME'




-- Package-specific info:
lsb_release output
-*- -*- -*- -*- -*-
Distributor ID: Debian
Description:Debian GNU/Linux testing (wheezy)
Release:testing
Codename:   wheezy
-*- -*- -*- -*- -*-
Apt policy
-*- -*- -*- -*- -*-
Package files:
 100 /var/lib/dpkg/status
 release a=now
 500 http://download.jitsi.org/deb/ unstable/ Packages
 release o=jitsi.org,a=unstable,n=sid,l=Jitsi Debian packages repository,c=
 origin download.jitsi.org
 100 http://www.debian-multimedia.org/ testing/non-free amd64 Packages
 release v=None,o=Unofficial Multimedia 
Packages,a=testing,n=wheezy,l=Unofficial Multimedia Packages,c=non-free
 origin www.debian-multimedia.org
 100 http://www.debian-multimedia.org/ testing/main amd64 Packages
 release v=None,o=Unofficial Multimedia 
Packages,a=testing,n=wheezy,l=Unofficial Multimedia Packages,c=main
 origin www.debian-multimedia.org
 500 http://mirror.cc.columbia.edu/debian/ testing/non-free Translation-en
 500 http://mirror.cc.columbia.edu/debian/ testing/main Translation-en
 500 http://mirror.cc.columbia.edu/debian/ testing/contrib Translation-en
 500 http://mirror.cc.columbia.edu/debian/ testing/non-free amd64 Packages
 release o=Debian,a=testing,n=wheezy,l=Debian,c=non-free
 origin mirror.cc.columbia.edu
 500 http://mirror.cc.columbia.edu/debian/ testing/contrib amd64 Packages
 release o=Debian,a=testing,n=wheezy,l=Debian,c=contrib
 origin mirror.cc.columbia.edu
 500 http://mirror.cc.columbia.edu/debian/ testing/main amd64 Packages
 release o=Debian,a=testing,n=wheezy,l=Debian,c=main
 origin mirror.cc.columbia.edu
Pinned packages:
-*- -*- -*- -*- -*-
   sources.list
-*- -*- -*- -*- -*-
deb-src http://mirror.cc.columbia.edu/debian/ testing main contrib non-free
deb http://mirror.cc.columbia.edu/debian/ testing main contrib non-free
deb http://www.debian-multimedia.org testing main non-free
-*- -*- -*- -*- -*-
 /etc/lsb_release
-*- -*- -*- -*- -*-
- none

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lsb-release depends on:
ii  python 2.7.3~rc2-1
ii  python2.6  2.6.8-0.2
ii  python2.7  2.7.3~rc2-2.1

Versions of packages lsb-release recommends:
ii  apt  0.9.7.1

Versions of packages lsb-release suggests:
pn  lsb  none

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org