Merge lp:~laney/apturl/1726327 into lp:apturl

Proposed by Iain Lane on 2017-10-23
Status: Merged
Approved by: Sebastien Bacher on 2017-10-23
Approved revision: 150
Merged at revision: 150
Proposed branch: lp:~laney/apturl/1726327
Merge into: lp:apturl
Diff against target: 30 lines (+9/-2)
2 files modified
AptUrl/Parser.py (+2/-2)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~laney/apturl/1726327
Reviewer Review Type Date Requested Status
Sebastien Bacher 2017-10-23 Approve on 2017-10-23
Review via email: mp+332625@code.launchpad.net
To post a comment you must log in.
Iain Lane (laney) wrote :

see the bug, I think it's because a trailing slash is being added

Sebastien Bacher (seb128) wrote :

that seems to address bug #1453576 as well

Sebastien Bacher (seb128) wrote :

change looks good to me

review: Approve
Will Cooke (willcooke) wrote :

Tested with xdg-open on Arful, and it has the desired effect.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AptUrl/Parser.py'
2--- AptUrl/Parser.py 2012-06-12 17:00:15 +0000
3+++ AptUrl/Parser.py 2017-10-23 11:28:39 +0000
4@@ -127,9 +127,9 @@
5 apt_url.repo_url = schema[len("apt+"):] + ":" + package.split("?",1)[0]
6 else:
7 if "?" in package:
8- apt_url.package = package.split("?")[0].lstrip("/")
9+ apt_url.package = package.split("?")[0].lstrip("/").rstrip("/")
10 else:
11- apt_url.package = package.lstrip("/")
12+ apt_url.package = package.lstrip("/").rstrip("/")
13
14 # now parse the ?... bits
15 if "?" in package:
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2015-12-16 10:23:15 +0000
19+++ debian/changelog 2017-10-23 11:28:39 +0000
20@@ -1,3 +1,10 @@
21+apturl (0.5.2ubuntu11) UNRELEASED; urgency=medium
22+
23+ * AptUrl/parser.py: Strip trailing slashes that are added by xdg-open/gio
24+ and which make package names invalid. (LP: #1726327)
25+
26+ -- Iain Lane <iain@orangesquash.org.uk> Mon, 23 Oct 2017 12:27:21 +0100
27+
28 apturl (0.5.2ubuntu10) xenial; urgency=medium
29
30 * debian/apturl.install:

Subscribers

People subscribed via source and target branches