Bug 1239274
Summary: | dnf history does not show command line | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> | ||||
Component: | dnf | Assignee: | Packaging Maintenance Team <packaging-team-maint> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 23 | CC: | an0nym, angiolucci, dennyvatwork, fedora2021q2, fulminemizzega, ignatenko, johnhatestrash, jsilhan, jzeleny, kparal, lantw44, mark, me, mezlm, mike, mluscon, mmraka, packaging-team-maint, pnemade, pschindl, samuel.rakitnican, steve.mckuhr, sudhir, tim.lauridsen, vascom2, vg.aetera, vmukhame | ||||
Target Milestone: | --- | Keywords: | Patch, Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | dnf-1.1.6 dnf-1.1.6-1.fc23 dnf-1.1.6-2.fc22 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-02-17 04:22:56 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Vít Ondruch
2015-07-05 08:21:55 UTC
*** This bug has been marked as a duplicate of bug 1218401 *** Sorry, but I don't understand why it should be duplicate of bug 1218401. My history cleanly shows "Command line" column, but only the older commands are stored/displayed for some reason. This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23 Can the migrate plugin, the history part be on the blame? I can see the same issue on my test server. All transactions with missing commandline has been done with dnf. And all migrated transactions have commandline visible. So no, that isn't migration plugin's fault ;). I can confirm this bug on my fresh Fedora 23 install dnf version: [asafonov@localhost ~]$ dnf --version 1.1.3 Installed: dnf-0:1.1.3-1.fc23.noarch at 2015-10-29 21:22 Built : Fedora Project at 2015-10-14 16:54 Installed: rpm-0:4.13.0-0.rc1.3.fc23.x86_64 at 2015-10-29 21:22 Built : Fedora Project at 2015-09-07 16:01 dnf history list result: [asafonov@localhost ~]$ sudo dnf history list [sudo] password for asafonov: Last metadata expiration check performed 2:14:55 ago on Sat Nov 7 18:42:30 2015. ID | Command line | Date a | Action | Altere ------------------------------------------------------------------------------- 13 | | 2015-11-06 23:25 | Install | 14 12 | | 2015-11-05 12:04 | Install | 2 11 | | 2015-11-05 00:08 | Install | 101 10 | | 2015-11-04 23:57 | Install | 3 9 | | 2015-11-04 23:54 | Install | 22 8 | | 2015-11-04 23:51 | Install | 3 7 | | 2015-11-04 23:46 | Install | 1 6 | | 2015-11-04 23:42 | Install | 2 5 | | 2015-11-04 23:37 | Install | 1 4 | | 2015-11-04 23:33 | Install | 103 EE 3 | | 2015-11-04 23:28 | I, U | 55 2 | | 2015-11-04 23:15 | Install | 12 1 | | 2015-11-04 23:14 | Install | 6 As you can see, command line column filled with empty value I can confirm this. It's not migrates plugin bug. I can confirm this as well. All blank command line history is directly after my "--releasever=23 system-upgrade" line. This is a regression, plain and simple. I have this very same issue on a fresh Fedora 23 install. *** Bug 1279237 has been marked as a duplicate of this bug. *** I think it is a bug of dnf-3. Transactions made by dnf-2 have correct command line values. I remember that this bug also happens on Fedora 22. F22 dnf is dnf-2 and F23 dnf is dnf-3, so some users don't find this problem on F22. Same here, after upgrading from F22 to F23, this is my dnf history: [...] 101 | | 2015-11-23 10:33 | Install | 4 100 | | 2015-11-22 18:48 | Install | 1 99 | | 2015-11-22 17:25 | Erase | 1 98 | | 2015-11-22 17:22 | Install | 1 97 | | 2015-11-22 17:17 | Install | 1 < 96 | | 2015-11-22 17:13 | Erase | 1 > 95 | | 2015-11-22 15:50 | Install | 1 94 | | 2015-11-22 15:50 | Erase | 14 93 | | 2015-11-22 15:49 | Erase | 1 92 | --releasever=23 system-u | 2015-11-22 15:22 | D, E, I, O, U | 2569 EE 91 | install dnf-plugin-syste | 2015-11-22 04:28 | Install | 2 [...] Same here, on both a F22 upgraded system and on a fresh F23: 1.1.4 Installed: dnf-0:1.1.4-1.fc23.noarch at 2015-11-19 20:12 Built : Fedora Project at 2015-11-16 15:28 Installed: rpm-0:4.13.0-0.rc1.7.fc23.x86_64 at 2015-11-25 09:07 Built : Fedora Project at 2015-11-20 13:08 I wrote a simple patch to fix the problem: --- /usr/lib/python3.4/site-packages/dnf/cli/main.py.old 2015-12-16 06:14:32.344055533 +0000 +++ /usr/lib/python3.4/site-packages/dnf/cli/main.py 2015-12-16 06:15:13.361906825 +0000 @@ -90,7 +90,7 @@ # do our cli parsing and config file setup # also sanity check the things being passed on the cli try: - cli.configure(map(ucd, args)) + cli.configure(list(map(ucd, args))) cli.check() except dnf.exceptions.LockError: raise It works on both Fedora 22 and Fedora 23. The problem is that map() returns a list on python2 but returns a map object on python3, so if python3 version of dnf is used, which is the default on Fedora >= 23, the map object holding command line arguments becomes empty after it is used by the option parser. Patch works for me, new actions are being logged now ID | Command line | Date a | Action | Altere ------------------------------------------------------------------------------- 110 | update | 2015-12-17 18:46 | E, I, U | 218 EE 109 | | 2015-12-15 20:48 | Erase | 1 108 | | 2015-12-15 20:43 | Install | 1 Works for me too Patch in comment #14 works for me. New dnf command line arguments are being logged now. ID | Linha de comando | Data e | Ação(õ | Altera ------------------------------------------------------------------------------- 37 | remove nano | 2015-12-19 03:27 | Erase | 1 36 | | 2015-12-19 03:08 | E, I, U | 83 35 | | 2015-12-17 18:11 | I, U | 107 Hey dnf folks, could we please push the patch, or is something else needed? (In reply to Ting-Wei Lan from comment #14) > I wrote a simple patch to fix the problem: > > --- /usr/lib/python3.4/site-packages/dnf/cli/main.py.old 2015-12-16 > 06:14:32.344055533 +0000 > +++ /usr/lib/python3.4/site-packages/dnf/cli/main.py 2015-12-16 > 06:15:13.361906825 +0000 > @@ -90,7 +90,7 @@ > # do our cli parsing and config file setup > # also sanity check the things being passed on the cli > try: > - cli.configure(map(ucd, args)) > + cli.configure(list(map(ucd, args))) > cli.check() > except dnf.exceptions.LockError: > raise > > > It works on both Fedora 22 and Fedora 23. The problem is that map() returns > a list on python2 but returns a map object on python3, so if python3 version > of dnf is used, which is the default on Fedora >= 23, the map object holding > command line arguments becomes empty after it is used by the option parser. The patch works for me too. Thank you. Looks like fix is waiting to be merged here: https://github.com/rpm-software-management/dnf/pull/424 It seems like dnf folks does not exist, at least on this bugzilla :p PR was merged, thanks. semiRocket, you're right. I am sorry but we haven't noticed it. Doing a pull request [1] can get your patch into the upstream (faster). [1] https://github.com/rpm-software-management/dnf#contribution dnf-plugins-core-0.1.16-1.fc23 dnf-1.1.6-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-80cbf309b4 dnf-plugins-core-0.1.16-1.fc22 dnf-1.1.6-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-573eba7b37 dnf-1.1.6-1.fc23, dnf-plugins-core-0.1.16-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-80cbf309b4 dnf-1.1.6-1.fc23, dnf-plugins-core-0.1.16-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. Hello, I installed dnf-1.1.6-1.fc23 update and the issue with dnf history is solved, now command line is correctly populated, but I encountered another error with dnf history info, you can see in attachment dnf.log. Created attachment 1119228 [details]
dnf history info error
dnf-1.1.6-1.fc22, dnf-plugins-core-0.1.16-1.fc22 has been pushed to the Fedora 22 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-573eba7b37 (In reply to fulminemizzega from comment #27) > Hello, > I installed dnf-1.1.6-1.fc23 update and the issue with dnf history is > solved, now command line is correctly populated, but I encountered another > error with dnf history info, you can see in attachment dnf.log. Please always file a separate report for separate issues. In this case, you don't have to, it's already reported as bug 1302510. dnf-1.1.6-2.fc22 dnf-plugins-core-0.1.16-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-573eba7b37 dnf-1.1.6-2.fc22, dnf-plugins-core-0.1.16-1.fc22 has been pushed to the Fedora 22 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-573eba7b37 dnf-1.1.6-2.fc22, dnf-plugins-core-0.1.16-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. Is the older history gone permanently? Commandline column is properly populated on recent transactions but older ones are empty. As you can see anything below transaction 242 is missing. $ rpm -qa | grep dnf dnf-conf-1.1.6-2.fc23.noarch python3-dnf-plugins-extras-common-0.0.12-1.fc23.noarch python3-dnf-1.1.6-2.fc23.noarch dnf-yum-1.1.6-2.fc23.noarch python3-dnf-plugins-core-0.1.16-1.fc23.noarch python3-dnf-plugins-extras-tracer-0.0.12-1.fc23.noarch dnf-1.1.6-2.fc23.noarch python3-dnf-langpacks-0.15.1-1.fc23.noarch dnf-plugins-core-0.1.16-1.fc23.noarch dnf-langpacks-0.15.1-1.fc23.noarch dnf-langpacks-conf-0.15.1-1.fc23.noarch 252 | update -y | 2016-02-05 15:28 | Update | 56 EE 251 | update -y | 2016-02-04 19:43 | Update | 5 250 | install libao.i686 | 2016-02-04 15:27 | Install | 1 249 | -y install --disablerepo | 2016-02-02 21:53 | Install | 1 248 | -y install --disablerepo | 2016-02-02 21:52 | Install | 1 247 | -y install --disablerepo | 2016-02-02 21:52 | Install | 1 246 | update | 2016-02-02 21:49 | E, I, U | 51 EE 245 | update -y | 2016-02-01 00:37 | Update | 87 244 | update -y | 2016-01-30 22:42 | Update | 4 243 | history undo last | 2016-01-29 22:22 | Erase | 16 242 | install hugin | 2016-01-29 21:19 | Install | 16 241 | | 2016-01-29 11:50 | Update | 53 240 | | 2016-01-28 16:50 | Update | 4 EE 239 | | 2016-01-28 00:23 | Update | 1 EE 238 | | 2016-01-28 00:09 | Update | 1 237 | | 2016-01-28 00:08 | Install | 1 236 | | 2016-01-28 00:08 | Install | 1 235 | | 2016-01-28 00:08 | Install | 1 234 | | 2016-01-28 00:04 | E, I, U | 27 EE 233 | | 2016-01-25 22:11 | I, U | 27 Yes, dnf did not log any command line until bug was fixed. |