[Merge] lp:~sampo555/software-properties/fix-1037916 into lp:software-properties

sampo555 sampo_75 at windowslive.com
Sat Sep 15 19:51:24 UTC 2012


sampo555 has proposed merging lp:~sampo555/software-properties/fix-1037916 into lp:software-properties.

Requested reviews:
  Ubuntu Core Development Team (ubuntu-core-dev)
Related bugs:
  Bug #972617 in software-properties (Ubuntu): "add-apt-repository silently fails to add/reactivate a previously commented out PPA"
  https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/972617
  Bug #994515 in software-properties (Ubuntu): "add-apt-repository stripped m from main"
  https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/994515
  Bug #1018327 in software-properties (Ubuntu): "apt-add-repository mangles ppa:sources.list files"
  https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1018327
  Bug #1037916 in software-properties (Ubuntu): "add-apt-repository doesn't add ppa if file with comments exists"
  https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1037916

For more details, see:
https://code.launchpad.net/~sampo555/software-properties/fix-1037916/+merge/124560

Construct paths for new sources list entries properly. This caused some weird behavior together with bug 1042916 in python-apt when adding a PPA that already had a file with entries present in the system.

Basically python-apt failed to match the new PPA to the existing one and apt-add-repository provided it with a confusing path to save the PPA to (the path had double-slash in it, for example '/etc/apt/sourceslist.d//ppa.list'). When python-apt saved the sources entries, it opened the same file twice: the first for the old entry with proper path and the second for the new entry. And when the changes were flushed at closing time the contents of the one closed first would be overridden by the contents of the one closed second.

This caused all kind of weird results to be written in the sources list file. Some results can be seen in bugs 972617, 994515 1018327 and 1037916.

Although this particular problem will be gone once the fix for bug 1042916 is released I think it's better to fix the other half of the problem too. This branch uses os.path.join to make sure the path is constructed properly.
-- 
https://code.launchpad.net/~sampo555/software-properties/fix-1037916/+merge/124560
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~sampo555/software-properties/fix-1037916 into lp:software-properties.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 706 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20120915/783c29e9/attachment.diff>


More information about the Ubuntu-reviews mailing list