Merge lp://staging/~luke-stanley/command-not-found/command-not-found into lp://staging/~command-not-found-developers/command-not-found/trunk

Proposed by voltlick
Status: Needs review
Proposed branch: lp://staging/~luke-stanley/command-not-found/command-not-found
Merge into: lp://staging/~command-not-found-developers/command-not-found/trunk
Diff against target: 61 lines (+30/-18)
1 file modified
CommandNotFound/CommandNotFound.py (+30/-18)
To merge this branch: bzr merge lp://staging/~luke-stanley/command-not-found/command-not-found
Reviewer Review Type Date Requested Status
Zygmunt Krynicki Needs Fixing
Review via email: mp+169497@code.staging.launchpad.net

Description of the change

Allows many more people to more easily install packages by prompting to install without them having to know about any flag to configure but also prompting if they want to disable assistance installing. (It's very easy to disable, and it still asks for permission each time of course.)
Instead of a more tricky environment switch it checks if ~/.config/DISABLE_COMMAND_NOT_FOUND_INSTALL_PROMPT exists to disable help or looks for touch ~/.config/COMMAND_NOT_FOUND_INSTALL_PROMPT to see that it is needed.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hi.

Thanks for your contribution. I don't think this can land as-is. Using ~/.config/*COMMAND_NOT_FOUND_* is certainly not in good tone (all-upper-caps, not using XDG_CONFIG_HOME).

I'm not sure if we should change how c-n-f operates in the way you've proposed. What I'd like to see instead is:

Use ConfigParser/configparser to load and write command-not-found settings from $XDG_CONFIG_HOME/command-not-found.conf. Have a few options that decide on what you want. Ensure that we're error resiliant (parser, issues, sane deefaults).

I cannot write that code myself at this time (busy) but if you're willing to iterate on your proposal this can eventually be merged.

Lastly. I'd like to see some discussion on <email address hidden> about this change. It's not major but just ask if anyone would oppose this change. It should be okay but for something that affects everyone using Ubuntu, it's worth to check.

If you need to chat about any of this in real time feel free to ping me (zyga) on #ubuntu-devel at any time. Thanks

review: Needs Fixing

Unmerged revisions

155. By voltlick

prompts the user once to ask for their preference on being asked about installing

154. By Michael Vogt

setup.py: call version 0.3 as its a python*3* verison ;)

153. By Michael Vogt

merged python3 port lp:~cjwatson/command-not-found/python3, thanks to Colin Watson

152. By Zygmunt Krynicki

Merge support for building pot files when running ./setup.py sdist

151. By Michael Vogt

merge from ubuntu but remove fixes we don't need

150. By Michael Vogt

cherry pick fixes from ubuntu

149. By Michael Vogt

merged lp:~mvo/command-not-found/remove-debian-dir

148. By Michael Vogt

merged lp:~mvo/command-not-found/install-prompt-env

147. By Michael Vogt

fix java recommends (LP: #853688)

146. By Zygmunt Krynicki

Merge improved zsh support from Alex Jurkiewicz

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches