Bug 1653690

Summary: Automatically recreated files at /var/lib/dnf/ – along with command 'dnf history' – are not operational.
Product: [Fedora] Fedora Reporter: ricky.tigg
Component: dnfAssignee: rpm-software-management
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 40CC: amatej, mblaha, mhatina, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

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
sqlite-3.24.0-2.fc29.x86_64
$ 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.

Comment 3 Ben Cotton 2020-11-03 17:29:40 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
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 '31'.

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 31 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.

Comment 4 Ben Cotton 2021-02-09 16:25:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Ben Cotton 2022-05-12 16:29:18 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
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
'version' of '34'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 6 Ben Cotton 2022-08-09 13:37:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 7 Aoife Moloney 2023-11-23 00:01:58 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
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
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 8 Aoife Moloney 2024-02-15 22:53:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.