PPAs added using GUI Software and Updates have an extra space added to repository line

Bug #1239893 reported by Julian Alarcon on 2013-10-15
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
High
Unassigned
software-properties (Ubuntu)
High
Unassigned
Precise
High
Unassigned
Saucy
High
Unassigned

Bug Description

*********************
 GENERAL DESCRIPTION
*********************
When I try to add a new PPA repository using Software and Updates gui the repository is added but software-properties-gtk adds an space to the line on /etc/apt/sources.list.d/ppa-name.list, as seen below:

darkhole@devolo:/etc/apt/sources.list.d$ cat libreoffice-ppa_-saucy.list
deb http://ppa.launchpad.net/libreoffice/ppa /ubuntu saucy main
# deb-src http://ppa.launchpad.net/libreoffice/ppa /ubuntu saucy main

The extra space is after the 'ppa' word.
ppa file should be:

deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu saucy main
# deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu saucy main

Using CLI method works fine (sudo add-apt-repository).

I'm using Ubuntu 13.10 with latest updates. I have already tried multiple PPAs, with the same result.

********
 IMPACT
********
It is not possible to use a PPA added using the form 'ppa:lpuser/ppaname using software-properties-gtk' as an extra space is inserted in the sources line for the PPA. This was due to the dropping of a strip() between versions 0.92.26 and 0.92.27. The change just adds the strip() back.

***********
 TEST CASE
***********
1. Open 'Software & Updates'.
2. Go to 'Other Software' tab.
3. Click on "Add..."
4. In the 'APT Line' Textbox write the PPA repository (example: 'ppa:libreoffice/ppa').
5. Click on "Add Source" button.
6. Check the contents of the file created on /etc/apt/sources.list.d/ppa-name.list, you'll notice an a space between ppa /ubuntu. Additionally the ppa-name.list file with have an underscore so 'ppa-name_.list'.

*******************
 TECHNICAL DETAILS
*******************
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: software-properties-gtk 0.92.27
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu2
Architecture: amd64
Date: Mon Oct 14 20:12:36 2013
InstallationDate: Installed on 2012-07-06 (465 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: software-properties
SystemImageInfo: Error: [Errno 2] No existe el archivo o el directorio: 'system-image-cli'
UpgradeStatus: Upgraded to saucy on 2013-01-20 (267 days ago)

Julian Alarcon (julian-alarcon) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
Changed in software-properties (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Changed in hundredpapercuts:
status: New → Confirmed
assignee: nobody → Paper Cuts Ninja (papercuts-ninja)
Changed in software-properties (Ubuntu):
milestone: none → saucy-updates
Brian Murray (brian-murray) wrote :

Could you please provide some more information regarding how exactly you add the software sources using software-properties? I ask as I have been unable to recreate this bug, and I have been going to the "Other Software" tab in software-properties and clicking "Add..." and then copying the good source line from the bug description into the sources dialog box.

Scott Moser (smoser) wrote :

i can verify this. its most likely a regression caused by my branch.
ubuntu-server-ec2-testing-dev-testing_-saucy.list

I ran software-properties-gtk, hit the 'other software' tab, then 'Add...' and typed:
   ppa:ubuntu-server-ec2-testing-dev/testing

The result there is
$ cat /etc/apt/sources.list.d/ubuntu-server-ec2-testing-dev-testing_-saucy.list
deb http://ppa.launchpad.net/ubuntu-server-ec2-testing-dev/testing /ubuntu saucy main
# deb-src http://ppa.launchpad.net/ubuntu-server-ec2-testing-dev/testing /ubuntu saucy main

Which should be
deb http://ppa.launchpad.net/ubuntu-server-ec2-testing-dev/testing/ubuntu saucy main
# deb-src http://ppa.launchpad.net/ubuntu-server-ec2-testing-dev/testing/ubuntu saucy main

Julian Alarcon (julian-alarcon) wrote :

Hi Brian

The steps are the same that you write
1. Open "Software & Updates"
2. Go to "Other Software" tab
3. Click on "Add..."
4. In the "APT Line" Textbox write the PPA source (example: ppa:libreoffice/ppa)
5. Click on "Add Source" button

Check the file created on /etc/apt/sources.list.d/ppa-name.list

description: updated
Scott Moser (smoser) wrote :

I just verified that this bug existed in 0.92.26. I did the following, and then ran software-properties-gtk again as described in comment 4 an dthe problem persisted.

names="python-software-properties python3-software-properties software-properties-common software-properties-gtk software-properties-kde"
burl=https://launchpad.net/ubuntu/+archive/primary/+files/

start=$PWD
for ver in 0.92.26 0.92.27; do
  mkdir -p $ver
  for x in $names; do
    n="${x}_${ver}_all.deb"
    wget "$burl/$n" -O "$n"
  done
done

Scott Moser (smoser) wrote :

well, after downloading I did:
sudo dpkg -i -O *0.92.26*.deb

Brian Murray (brian-murray) wrote :

It looks to me like ppa.py is a missing a strip() somewhere as DialogAdd.py adds in a "\n".

From DialogAdd.py:

  def check_line(self, *args):
    """
    Check for a valid apt line and set the sensitiveness of the
    button 'add' accordingly
    """
    line = self.entry.get_text() + "\n"

Brian Murray (brian-murray) wrote :

I tested this and it works in expand_ppa_line of ppa.py but I'm not sure that's the best spot for it.

def expand_ppa_line(abrev, distro_codename):
    """ Convert an abbreviated ppa name of the form 'ppa:$name' to a
        proper sources.list line of the form 'deb ...' """
    # leave non-ppa: lines unchanged
    if not abrev.startswith("ppa:"):
        return (abrev, None)
    # FIXME: add support for dependency PPAs too (once we can get them
    # via some sort of API, see LP #385129)
    abrev = abrev.strip().split(":")[1]

tags: added: regression-release
Scott Moser (smoser) wrote :

ok. so i was wrong in my comments above. this did regress in 0.92.27.

description: updated
description: updated

Brian, note that you did some little mistakes in you last edition 😵:

- ProblemType: Bug
- DistroRelease: Ubuntu 13.10
+ ProblemType: BugDistroRelease: Ubuntu 13.10

- PackageArchitecture: all
- SourcePackage: software-properties
+ PackageArchitecture: allSourcePackage: software-properties

description: updated
Brian Murray (brian-murray) wrote :

This'll need to be fixed in Precise too since bug 1233486 was SRU'ed there.

Changed in software-properties (Ubuntu Precise):
status: New → Triaged
importance: Undecided → High
milestone: none → precise-updates
Brian Murray (brian-murray) wrote :

I've tested this in precise, using software-properties-gtk version 0.82.7.6, and it is in fact not affected by the change.

Changed in software-properties (Ubuntu Precise):
status: Triaged → Invalid
Changed in software-properties (Ubuntu Saucy):
assignee: nobody → Brian Murray (brian-murray)

Hello Julian, or anyone else affected,

Accepted software-properties into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/software-properties/0.92.27.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in software-properties (Ubuntu Saucy):
status: Triaged → Fix Committed
tags: added: verification-needed
Benjamin Xiao (ben-r-xiao) wrote :

I've confirmed that software-properties 0.92.27.1 works in Saucy. Computer needs a reboot for the fix to take into effect.

tags: added: verification-done
removed: verification-needed
Changed in software-properties (Ubuntu):
status: Triaged → Fix Committed
status: Fix Committed → Triaged
status: Triaged → Fix Committed
Changed in hundredpapercuts:
status: Confirmed → Fix Committed
Adam Conrad (adconrad) wrote :

Hello Julian, or anyone else affected,

Accepted software-properties into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/software-properties/0.92.28 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed

I've successfully added two PPA repositories in software-properties (version 0.92.28) and then I was greeted with dialog about change of sources in Synaptic.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.92.28

---------------
software-properties (0.92.28) saucy; urgency=low

  [ Bruno Nova ]
  * Ensure package sources are refreshed after modification
    Fixes Bug LP: #1075537 (and, indirectly, Bug LP: #782953 it seems).

  [ Brian Murray ]
  * Restore the removal of a line feed from a source (LP: #1239893)

  [ Jean-Baptiste Lallement ]

  * debian/manpages/add-apt-repository.1: Documented options -m and -s of
    add-apt-repository (LP: #1229092)

  [ Sebastien Bacher ]
  * softwareproperties/gtk/SoftwarePropertiesGtk.py: don't use the
    gtk-logout-helper command, it has been deprecated and dropped from the
    indicator-session binary, use gnome-session instead (lp: #1241210)
 -- Sebastien Bacher <email address hidden> Mon, 21 Oct 2013 11:16:21 -0400

Changed in software-properties (Ubuntu):
status: Fix Committed → Fix Released

Since this bug is fixed for all valid series, it is for the package.

Changed in software-properties (Ubuntu):
status: Fix Released → Fix Committed

Since this bug is fixed, nobody needs to work in it.

Changed in software-properties (Ubuntu Saucy):
assignee: Brian Murray (brian-murray) → nobody
Changed in software-properties (Ubuntu):
assignee: Brian Murray (brian-murray) → nobody
Changed in hundredpapercuts:
assignee: Papercuts Ninja (papercuts-ninja) → nobody

Since the bug has a priority of "high" for the Ubuntu package, it has also for the "One Hundred Papercuts" project.

Changed in hundredpapercuts:
importance: Undecided → High
Changed in software-properties (Ubuntu):
status: Fix Committed → Fix Released
Changed in software-properties (Ubuntu Saucy):
status: Fix Committed → Fix Released
Changed in hundredpapercuts:
status: Fix Committed → Fix Released
Brian Murray (brian-murray) wrote :

Contrary to the comment by the janitor the bug is not in fact fixed in Saucy. You could verify this by going to https://launchpad.net/ubuntu/+source/software-properties or using 'rmadison software-properties-gtk'. The status should be Fix Committed for Saucy. Could you please refrain from adjusting this bug's status?

Changed in software-properties (Ubuntu Saucy):
status: Fix Released → Fix Committed

Yes Brian. I will only watch ⚇

Changed in hundredpapercuts:
status: Fix Released → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.92.28

---------------
software-properties (0.92.28) saucy; urgency=low

  [ Bruno Nova ]
  * Ensure package sources are refreshed after modification
    Fixes Bug LP: #1075537 (and, indirectly, Bug LP: #782953 it seems).

  [ Brian Murray ]
  * Restore the removal of a line feed from a source (LP: #1239893)

  [ Jean-Baptiste Lallement ]

  * debian/manpages/add-apt-repository.1: Documented options -m and -s of
    add-apt-repository (LP: #1229092)

  [ Sebastien Bacher ]
  * softwareproperties/gtk/SoftwarePropertiesGtk.py: don't use the
    gtk-logout-helper command, it has been deprecated and dropped from the
    indicator-session binary, use gnome-session instead (lp: #1241210)
 -- Sebastien Bacher <email address hidden> Mon, 21 Oct 2013 11:16:21 -0400

Changed in software-properties (Ubuntu Saucy):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Changed in hundredpapercuts:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers