Description of problem: This bug is about the interplay between dnf and etckeeper (more specifically the etckeeper-dnf package). etckeeper has an option that, when enabled, aborts a 'dnf upgrade/install' operation when etckeeper detects there are uncommitted changes under /etc. This used to work fine, but now on Fedora 29, after etckeeper raises an error, dnf continues upgrading/installing packages, instead of aborting and letting the user 'etckeeper commit' first. Version-Release number of selected component (if applicable): dnf-4.2.2-2.fc29 etckeeper-dnf-1.18.8-1.fc29 etckeeper-1.18.8-1.fc29 How reproducible: Always Steps to Reproduce: 1. In `/etc/etckeeper/etckeeper.conf`, uncomment `AVOID_COMMIT_BEFORE_INSTALL=1` 2. sudo dnf upgrade Actual results: $ sudo dnf upgrade Last metadata expiration check: 0:24:00 ago on Sun 21 Apr 2019 09:09:27 PM CDT. ** etckeeper detected uncommitted changes in /etc prior to dnf run ** Aborting dnf run. Manually commit and restart. Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/dnf/plugin.py", line 104, in _caller getattr(plugin, method)() File "/usr/lib/python3.7/site-packages/dnf-plugins/etckeeper.py", line 28, in resolved raise dnf.exceptions.Error('etckeeper returned %d' % (ret >> 8)) dnf.exceptions.Error: etckeeper returned 1 Dependencies resolved. ======================================================================================================================================================================================= Package Architecture Version Repository Size ======================================================================================================================================================================================= Installing: kernel x86_64 5.0.7-200.fc29 updates 30 k kernel-core x86_64 5.0.7-200.fc29 updates 26 M ... Expected results: dnf aborts upon etckeeper returned 1 Additional info: None.
I created a patch that runs plugins safely, but in case that plugin raises dnf.exceptions, it allows termination (https://github.com/rpm-software-management/dnf/pull/1383).
dnf-4.2.5-1.fc29 libdnf-0.31.0-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2612a121ba
dnf-4.2.5-1.fc29, libdnf-0.31.0-2.fc29 has been pushed to the Fedora 29 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-2019-2612a121ba
dnf-4.2.5-1.fc29, libdnf-0.31.0-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.