Description of problem: DNF plugin should be able to set non-zero exit code but allow dnf to continue. For history and reasoning see yum bug 982122 (and original reason of user in bug 982068).
similar to bug 1062889, needs the signup mechanism.
Related: bug 658210, bug 684859. Very chaotic. What we will provide in DNF is a code for exits that core DNF itself considers a success otherwise. If DNF CLI for instance encounters unreadable main config file or similar it will terminate with its own error soon (i.e. 1). Note it's probably not an entirely solid design for a plugin to use the return value to communicate some sort of semi-error to the user. Plugins can raise an exception if they fail which will be propagated to DNF, logged to the terminal and handled as a DNF error (i.e. return code 1 again).
Why should be all errors fatals? And raising of exception will mean termination of DNF. I can see those level: 1) warning to stderr 2) warning to stderr with non zero return code 3) fatal error with non zero return code 1 and 3 is currently possible. 2 is not possible. I see use case of 2) when some non fatal error occurred, and human can usually handle it. But automated script should rather process it as error. And status code is much better than parsing stderr of DNF.
Right, that's what the fix will allow.
Fixed on master by 8830a1c. The plugins can now do e.g. cli.demands.success_exit_status = 29 To set the program exit status for cases where it does not terminate with a fatal error.
dnf-0.5.1-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dnf-0.5.1-1.fc20
Package dnf-0.5.1-1.fc20, hawkey-0.4.14-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.5.1-1.fc20 hawkey-0.4.14-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-5937/hawkey-0.4.14-1.fc20,dnf-0.5.1-1.fc20 then log in and leave karma (feedback).
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20
Package dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.0.8-2.fc20 libsolv-0.6.1-1.git6d968f1.fc20 hawkey-0.4.16-1.fc20 dnf-0.5.2-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-6789/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20 then log in and leave karma (feedback).
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.