Merge lp:~gandelman-a/software-properties/lp829109 into lp:software-properties

Proposed by Adam Gandelman on 2011-08-19
Status: Merged
Merged at revision: 716
Proposed branch: lp:~gandelman-a/software-properties/lp829109
Merge into: lp:software-properties
Diff against target: 30 lines (+4/-2)
1 file modified
add-apt-repository (+4/-2)
To merge this branch: bzr merge lp:~gandelman-a/software-properties/lp829109
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team 2011-08-19 Pending
Review via email: mp+72124@code.launchpad.net

Description of the change

Rev. 708 adds a new confirmation dialog that requires user interaction when adding a new PPA. This adds a '-y' option to avoid confirmation dialog. Useful for any script that is now broken because of the new behavior. Fixes bug #829109

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'add-apt-repository'
2--- add-apt-repository 2011-08-12 11:12:22 +0000
3+++ add-apt-repository 2011-08-19 00:17:24 +0000
4@@ -50,6 +50,9 @@
5 parser.add_option("-k", "--keyserver",
6 dest="keyserver", default=DEFAULT_KEYSERVER,
7 help="URL of keyserver. Default: %default")
8+ parser.add_option("-y", "--yes", action="store_true",
9+ dest="assume_yes", default=False,
10+ help="Assume yes to all queries")
11 (options, args) = parser.parse_args()
12
13 if os.geteuid() != 0:
14@@ -67,7 +70,7 @@
15 line = args[0]
16
17 # display PPA info (if needed)
18- if line.startswith("ppa:"):
19+ if line.startswith("ppa:") and not options.assume_yes:
20 from softwareproperties.ppa import get_ppa_info_from_lp
21 user, sep, ppa_name = line.split(":")[1].partition("/")
22 ppa_name = ppa_name or "ppa"
23@@ -79,7 +82,6 @@
24 if sys.stdin.isatty():
25 print _("Press [ENTER] to continue or ctrl-c to cancel adding it")
26 sys.stdin.readline()
27-
28
29 # add it
30 sp = SoftwareProperties(options=options)

Subscribers

People subscribed via source and target branches

to status/vote changes: