Merge lp:~evfool/software-properties/lp1170114 into lp:software-properties

Proposed by Robert Roth
Status: Merged
Merged at revision: 856
Proposed branch: lp:~evfool/software-properties/lp1170114
Merge into: lp:software-properties
Diff against target: 27 lines (+4/-6)
1 file modified
software-properties-gtk (+4/-6)
To merge this branch: bzr merge lp:~evfool/software-properties/lp1170114
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+170185@code.launchpad.net

Description of the change

As we have add-apt-repository as the command line tool for adding/removing/enabling/disabling PPAs and distro components, I would suggest removing the command-line switch for enabling a component from software-properties-gtk to avoid duplication of code and functionality within the same project.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

On Tue, Jun 18, 2013 at 07:52:30PM -0000, Robert Roth wrote:
> Robert Roth has proposed merging lp:~evfool/software-properties/lp1170114 into lp:software-properties.
>
> Requested reviews:
> Ubuntu Core Development Team (ubuntu-core-dev)
> Related bugs:
> Bug #1170114 in software-properties (Ubuntu): "Add --disable-component option"
> https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1170114
>
> For more details, see:
> https://code.launchpad.net/~evfool/software-properties/lp1170114/+merge/170185
>
> As we have add-apt-repository as the command line tool for adding/removing/enabling/disabling PPAs and distro components, I would suggest removing the command-line switch for enabling a component from software-properties-gtk to avoid duplication of code and functionality within the same project.

Thanks Robert! I think removing duplication is a good idea, but
instead of removing it entirely I would suggest that we add a message
to the user what the replacement interface is what how its used.

Thanks,
 Michael

Revision history for this message
Robert Roth (evfool) wrote :

I have also though about that after I have proposed the merge. I'll update this proposal with a message to use add-apt-repository instead, with an example invocation.

Revision history for this message
Robert Roth (evfool) wrote :

Branch updated, please check if it's ok for you.

Revision history for this message
Michael Vogt (mvo) wrote :

On Wed, Jun 19, 2013 at 07:44:28AM -0000, Robert Roth wrote:
> Robert Roth has proposed merging lp:~evfool/software-properties/lp1170114 into lp:software-properties.
>
> Requested reviews:
> Ubuntu Core Development Team (ubuntu-core-dev)
> Related bugs:
> Bug #1170114 in software-properties (Ubuntu): "Add --disable-component option"
> https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1170114
>
> For more details, see:
> https://code.launchpad.net/~evfool/software-properties/lp1170114/+merge/170185
>
> As we have add-apt-repository as the command line tool for adding/removing/enabling/disabling PPAs and distro components, I would suggest removing the command-line switch for enabling a component from software-properties-gtk to avoid duplication of code and functionality within the same project.
> --
> https://code.launchpad.net/~evfool/software-properties/lp1170114/+merge/170185
> You are subscribed to branch lp:software-properties.

Thanks, I think this is good now. +1

Revision history for this message
Robert Roth (evfool) wrote :

In that case I'd appreciate a merge, as I'm not a member of the Ubuntu Core Dev Team :)

Revision history for this message
Martin Pitt (pitti) wrote :

merged with a changelog entry, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'software-properties-gtk'
2--- software-properties-gtk 2012-06-21 21:00:08 +0000
3+++ software-properties-gtk 2013-06-19 07:34:26 +0000
4@@ -57,7 +57,7 @@
5 action="store", type="string", dest="toplevel",
6 help="Set x-window-id of the toplevel parent for the "\
7 "dialog (useful for embedding)")
8- parser.add_option("-e", "--enable-component",
9+ parser.add_option("-e", "--enable-component",
10 action="store", type="string", dest="enable_component",
11 help="Enable the specified component of the distro's "\
12 "repositories")
13@@ -94,11 +94,9 @@
14 app.add_source_from_line("ppa:%s" % options.enable_ppa)
15 app.sourceslist.save()
16 elif options.enable_component:
17- sourceslist = SourcesList()
18- distro = aptsources.distro.get_distro()
19- distro.get_sources(sourceslist)
20- distro.enable_component(options.enable_component)
21- sourceslist.save()
22+ print(_("The --enable-component/-e command-line switch has been deprecated. "
23+ "Instead of 'software-properties-gtk -e multiverse' you can use \n'add-apt-repository multiverse'"))
24+ sys.exit(1)
25 else:
26 app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
27 app.run()

Subscribers

People subscribed via source and target branches

to status/vote changes: