ppa-purge fails to remove packages when ppa repository includes a plus in the name

Bug #1548881 reported by Edward Schwartz
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ppa-purge (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When ppa-purge attempts to disable a repository that has a plus in the name, it fails because sed interprets the plus as part of the regular expression.

When running sudo ppa-purge ppa:avsm/ocaml42+opam120, here is the argument passed to sed:

\:^[^#]+/avsm/ocaml42+opam120/:s/^deb/# deb/

Note that this should be:

\:^[^#]+/avsm/ocaml42\+opam120/:s/^deb/# deb/

Here is the output I get, showing that the package versions don't change because the repository is not actually removed:

fuzz@UbuFuzz:/etc/apt/sources.list.d$ sudo ppa-purge ppa:avsm/ocaml42+opam120
Updating packages lists
PPA to be removed: avsm ocaml42+opam120
Package revert list generated:
 camlp4/trusty camlp4-extra/trusty ocaml/trusty ocaml-base/trusty
ocaml-base-nox/trusty ocaml-compiler-libs/trusty ocaml-interp/trusty
ocaml-mode/trusty ocaml-native-compilers/trusty ocaml-nox/trusty opam/trusty
opam-docs/trusty

Disabling avsm PPA from /etc/apt/sources.list.d/avsm-ocaml42_opam120-trusty.list
\:^[^#]+/avsm/ocaml42+opam120/:s/^deb/# deb/
Updating packages lists
Reading package lists... Done
Building dependency tree
Reading state information... Done
camlp4 is already the newest version.
ocaml is already the newest version.
ocaml-base is already the newest version.
ocaml-base-nox is already the newest version.
ocaml-compiler-libs is already the newest version.
ocaml-interp is already the newest version.
ocaml-native-compilers is already the newest version.
ocaml-nox is already the newest version.
ocaml-mode is already the newest version.
camlp4-extra is already the newest version.
opam is already the newest version.
opam-docs is already the newest version.
Selected version '4.02.1+3-1ppa1~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'camlp4'
Selected version '4.02.1+3-1ppa1~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'camlp4-extra'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml-base'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml-base-nox'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml-compiler-libs'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml-interp'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [all]) for 'ocaml-mode'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml-native-compilers'
Selected version '4.02.1-1ppa3~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'ocaml-nox'
Selected version '1.2.0-1ppa1~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [i386]) for 'opam'
Selected version '1.2.0-1ppa1~trusty' (OCaml 4.02.1 + OPAM 1.2.0:14.04/trusty [all]) for 'opam-docs'
0 upgraded, 0 newly installed, 0 to remove and 35 not upgraded.
PPA purged successfully

fuzz@UbuFuzz:/etc/apt/sources.list.d$ cat /etc/apt/sources.list.d/avsm-ocaml42_opam120-trusty.list
deb http://ppa.launchpad.net/avsm/ocaml42+opam120/ubuntu trusty main
deb-src http://ppa.launchpad.net/avsm/ocaml42+opam120/ubuntu trusty main

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ppa-purge (Ubuntu):
status: New → Confirmed
Revision history for this message
Jarno Suni (jarnos) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.