Comment 5 for bug 514861

Revision history for this message
Gary Lasker (gary-lasker) wrote :

Hi Kiwinote. Thanks, that's good info. Ok, following your exact steps, I could reproduce. The problem seems to stem from the fact that you have manually deleted the /etc/apt/sources.list.d/ directory, which is actually needed by apt. The fact that apt doesn't add /etc/apt/source.list.d if it is missing is a separate issue and a bug that needs to be fixed (more on that later). However, regarding the specific problem you mentioned, here are some details:

In the normal case in stock lucid, the standard /etc/apt/sources.list file contains a (commented out) reference to the partner channel as shown:

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu lucid partner
# deb-src http://archive.canonical.com/ubuntu lucid partner

If you enable the partner channel using the "Use This Source" button in Software Center, the line above is simply uncommented and the source is enabled correctly, and the test case works.

If you have removed this partner entry from /etc/apt/sources.list, then clicking "Use This Source" will instead create a new file /etc/apt/sources.list.d/lucid-partner.list. In this case, the partner repo is also enabled correctly.

However, if the /etc/apt/sources.list.d/ directory itself has been *manually* deleted, then it does not get re-created and so the partner repo is *not* added, with the result that you report in comment #4. This is a bug in apt itself, and should be fixed (we'll either reassign this bug or open a new one for that).

In the meantime, I did find that if you manually recreate /etc/apt/sources.list.d (sudo mkdir /etc/apt/sources.list.d), and try again, then everything works correctly. Please give that a shot and let us know if this fixes the problem for you also.