Merge lp:~cjwatson/launchpad/add-apt-repository-example into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18163
Proposed branch: lp:~cjwatson/launchpad/add-apt-repository-example
Merge into: lp:launchpad
Diff against target: 59 lines (+8/-9)
2 files modified
lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt (+3/-2)
lib/lp/soyuz/templates/archive-index.pt (+5/-7)
To merge this branch: bzr merge lp:~cjwatson/launchpad/add-apt-repository-example
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+300298@code.launchpad.net

Commit message

Show explicit add-apt-repository command on Archive:+index.

Description of the change

Show explicit add-apt-repository command on Archive:+index. Pretty much everyone has a new enough add-apt-repository nowadays.

The tests for this are just in pagetests, ugh, but the pagetests in question are quite large and I didn't want to take the time to rewrite them.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

This won't work for a private PPA, but that workflow is already dodgy enough that this doesn't make it significantly worse.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt'
2--- lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2016-03-03 18:41:27 +0000
3+++ lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2016-07-27 01:51:22 +0000
4@@ -240,7 +240,7 @@
5 >>> def publishToPPA(person_name, distroseries_name, name, version):
6 ... person = getUtility(IPersonSet).getByName(person_name)
7 ... distroseries = person.archive.distribution[distroseries_name]
8- ... ign = factory.makeSourcePackagePublishingHistory(
9+ ... factory.makeSourcePackagePublishingHistory(
10 ... distroseries=distroseries, archive=person.archive,
11 ... sourcepackagename=name, version=version)
12
13@@ -267,6 +267,8 @@
14 You can update your system with unsupported packages from this
15 untrusted PPA by adding ppa:cprov/ppa to your system's Software Sources.
16 (Read about installing)
17+ sudo add-apt-repository ppa:cprov/ppa
18+ sudo apt-get update
19 Technical details about this PPA
20 ...
21 For questions and bugs with software in this PPA please contact
22@@ -395,7 +397,6 @@
23 is also included in the statistics portlet.
24
25 >>> from lp.buildmaster.enums import BuildStatus
26- >>> from lp.registry.interfaces.person import IPersonSet
27 >>> from lp.soyuz.interfaces.binarypackagebuild import (
28 ... IBinaryPackageBuildSet)
29 >>> login('foo.bar@canonical.com')
30
31=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
32--- lib/lp/soyuz/templates/archive-index.pt 2014-11-24 21:01:04 +0000
33+++ lib/lp/soyuz/templates/archive-index.pt 2016-07-27 01:51:22 +0000
34@@ -82,13 +82,6 @@
35
36 <tal:is-active condition="archive_active">
37
38- <tal:comment replace="nothing">
39- XXX Michael Nelson 2010-02-25 bug=440512: Until we have
40- apt-add-repository backported, we can't simply state one
41- explicit solution here. Until then we just state a general
42- solution with the details in the linked help.
43- </tal:comment>
44-
45 <p>You can update your system with unsupported packages from
46 this untrusted PPA by adding <strong
47 tal:content="context/fmt:reference" class="ppa-reference">ppa:cprov/ppa</strong>
48@@ -97,6 +90,11 @@
49 target="help">Read about installing</a>)
50 </p>
51
52+ <pre class="command subordinate" tal:condition="not: context/private">
53+sudo add-apt-repository <tal:reference tal:replace="context/fmt:reference" />
54+sudo apt-get update
55+ </pre>
56+
57 <div class="widget-header">
58 Technical details about this PPA
59 </div>