Bug 1289164 - [RFE] positive prompt answer by default
[RFE] positive prompt answer by default
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-07 10:01 EST by Michael S. Tsirkin
Modified: 2016-04-13 03:21 EDT (History)
6 users (show)

See Also:
Fixed In Version: dnf-1.1.8-1.fc24 dnf-1.1.8-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-13 03:21:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael S. Tsirkin 2015-12-07 10:01:37 EST
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-21 23:31:01 EST
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 03:54:15 EST
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 10:38:19 EDT
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 06:01:54 EDT
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 12:54:08 EDT
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 12:58:59 EDT
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 16:51:17 EDT
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 03:21:27 EDT
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.