[Bug 1042916] Re: sourceslist.SourcesList doesn't reuse disabled sources entries

sampo555 1042916 at bugs.launchpad.net
Sat Sep 1 08:33:43 UTC 2012


I don't exactly know the inner workings of the release upgrader but it
seems that the sourceslist.py in the release upgrader is copied to the
package at build time as it's just a symbolic link to sourceslist.py of
python3-apt.

So as long as the fix gets into python-apt, it's also going to be in
ubuntu-release-upgrader too...

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1042916

Title:
  sourceslist.SourcesList doesn't reuse disabled sources entries

Status in “python-apt” package in Ubuntu:
  In Progress
Status in “ubuntu-release-upgrader” package in Ubuntu:
  New

Bug description:
  If sourceslist contains a disabled entry (commented out) and the
  exactly same entry is added with sourceslist.SourcesList.add method,
  new entry is created instead of enabling the disabled duplicate.

  Steps to reproduce:
  1. Add a repository:
    # apt-add-repository 'deb http://ppa.launchpad.net/videolan/stable-daily/ubuntu precise main'
  2. Edit sources.list and comment out the newly added entry
  3. Add it again:
   # apt-add-repository 'deb http://ppa.launchpad.net/videolan/stable-daily/ubuntu precise main'
  4. Notice the duplicated lines: one disabled, the other enabled

  What should happen:
  4. The disabled line is now enabled.

  Why this happens:
  On line 316 the condition 'set(source.comps) == comps' will always be False (at least with python 2.7 and 3.2) as you can see doing following in a python shell:
  >>> set([]) == []
  False
  >>> set(["precise", "main"]) == ["precise", "main"] # this was the case in the example above.
  False

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: python-apt 0.8.3ubuntu7
  ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
  Uname: Linux 3.2.0-29-generic x86_64
  ApportVersion: 2.0.1-0ubuntu12
  Architecture: amd64
  Date: Tue Aug 28 22:02:45 2012
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=fi_FI.UTF-8
   SHELL=/bin/bash
  SourcePackage: python-apt
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1042916/+subscriptions




More information about the foundations-bugs mailing list