Bug 1289164 - [RFE] positive prompt answer by default
Summary: [RFE] positive prompt answer by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-07 15:01 UTC by Michael S. Tsirkin
Modified: 2016-04-13 07:21 UTC (History)
6 users (show)

Fixed In Version: dnf-1.1.8-1.fc24 dnf-1.1.8-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-13 07:21:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael S. Tsirkin 2015-12-07 15:01:37 UTC
Description of problem:
dnf has a -y flag to avoid prompting users for any questions.
I personally like being prompted, to make sure
there is no mistake, so I can not use -y.
But I typically do the right thing, so it's distracting
that the default is N.

It would be nice if I could set an option to prompt
but default to Y, so I can just press enter to confirm.

Version-Release number of selected component (if applicable):
dnf-1.1.4-2.fc23.noarch

How reproducible:
always

Steps to Reproduce:
1. dnf install libwebcam


Actual results:

Is this ok [y/N]: 

Expected results:

Is this ok [Y/n]: 

Additional info:

this is the default with apt-get.

Comment 1 Matt Sturgeon 2016-02-22 04:31:01 UTC
I would also like this option.

Reading the man page for dnf.conf I had hoped that assumeyes would provide this functionality.

Perhaps a defaultprompt option (and --default-promtp command line argument) can be added with options Yes, Y, No and N, defaulting to N?

Comment 2 Matt Sturgeon 2016-02-22 08:54:15 UTC
Having looked through the code to see if I could implement this, I found it is already included![1]

You can achieve this by adding `defaultyes=True` to your `/etc/dnf/dnf.conf`.

I've sent a pull request to add `defaultyes` to the docs.[2]

A `--defaultyes` and `--defaultno` flag would be useful too.


[1]: https://github.com/rpm-software-management/dnf/blob/master/dnf/cli/output.py#L628

[2]: https://github.com/rpm-software-management/dnf/pull/447

Comment 3 Fedora Update System 2016-04-06 14:38:19 UTC
dnf-plugins-core-0.1.20-1.fc24 dnf-1.1.8-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5dae5d2add

Comment 4 Fedora Update System 2016-04-07 10:01:54 UTC
dnf-1.1.8-1.fc23 dnf-plugins-core-0.1.20-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ddeabfcfe6

Comment 5 Fedora Update System 2016-04-07 16:54:08 UTC
dnf-1.1.8-1.fc24, dnf-plugins-core-0.1.20-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5dae5d2add

Comment 6 Fedora Update System 2016-04-08 16:58:59 UTC
dnf-1.1.8-1.fc24, dnf-plugins-core-0.1.20-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2016-04-08 20:51:17 UTC
dnf-1.1.8-1.fc23, dnf-plugins-core-0.1.20-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ddeabfcfe6

Comment 8 Fedora Update System 2016-04-13 07:21:27 UTC
dnf-1.1.8-1.fc23, dnf-plugins-core-0.1.20-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.