Bug 1653690 - Automatically recreated files at /var/lib/dnf/ – along with command 'dnf history' – are not operational.
Summary: Automatically recreated files at /var/lib/dnf/ – along with command 'dnf hist...
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 31
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-11-27 12:09 UTC by ricky.tigg
Modified: 2020-02-14 07:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description ricky.tigg 2018-11-27 12:09:13 UTC
Description of problem:: automatically recreated required files at /var/lib/dnf/  , while 'dnf history' has been executed, are not operational.

Version-Release number component: dnf.noarch 4.0.4-2.fc29

Steps to Reproduce:

$ sudo rm -rf /var/lib/dnf/*
$ ls /var/lib/dnf
$ sudo dnf history
No transactions
$ ls /var/lib/dnf
history.sqlite  history.sqlite-shm  history.sqlite-wal

$ sudo dnf -y --refresh upgrade
$ sudo dnf history
No transactions

Actual results: 
case 1 – After the resources present in /var/lib/dnf/ have been removed, along with the execution of command 'dnf history', required files for command 'dnf history' to work are recreated; yet they are not operational as illustrates command's output 'No transactions', despite 'sudo dnf -y --refresh upgrade' was previously executed.

case 2 – At last along with the re-installation of sqlite, those same required files are recreated with correct specifications, though they do not reflect a beginning state, – see presence of history '-y reinstall sqlite'.

$ rpm -q sqlite
$ sudo dnf -y reinstall sqlite
$ ls /var/lib/dnf
history.sqlite  history.sqlite-shm  history.sqlite-wal
$ sudo dnf history
ID     | Command line             | Date and time    | Action(s)      | Altered
     1 | -y reinstall sqlite      | 2018-11-27 12:04 | R              |    2   

Expected results: 
In case 1, files to be operational.
In case 2, files to reflect an initial state – no events –, which can be illustrated as:

$ sudo dnf history
ID     | Command line             | Date and time    | Action(s)      | Altered

Comment 1 Daniel Mach 2019-08-19 05:12:51 UTC
I'm thinking about a new feature that would improve behavior in both cases:
* Any time a history database and system state differ, a transaction containing the difference is be created.
* Then a usual transaction record is created.

Another option would be capturing the whole system state on every transaction,
but we need to evaluate storage cost - history db should be as small as possible.

I'm putting this to the long-term backlog as it is low priority
(users are not supposed to remove the history database)
and it may require bigger changes in the history backend.

Comment 2 Ben Cotton 2019-10-31 18:56:44 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

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