Bug 1950037 - libdnf file monitor on rpmdb doesn't point to a valid rpmdb file path
Summary: libdnf file monitor on rpmdb doesn't point to a valid rpmdb file path
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: 36
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-15 15:46 UTC by Rex Dieter
Modified: 2023-05-25 18:53 UTC (History)
15 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-05-25 18:53:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rpm-software-management libdnf pull 1542 0 None open context: Get RPM db path from RPM, with common fallbacks 2022-06-16 10:19:27 UTC

Description Rex Dieter 2021-04-15 15:46:16 UTC
Once upon a time (maybe f32? or early f33), whenever I did any operations to change rpmdb outside of PackageKit (via manual rpm or dnf), I could issue:
pkcon refresh

and PackageKit would notice.  Now it doesn't, I have to do:
pkcon refresh force
(which takes much longer)

Specific example:
1. PackageKit UI reports an update of package foo is available in updates
2.  dnf update foo , to install the update
3.  pkcon refresh

After this, prior behavior would be that PackageKit would update to not report update is available anymore.  Now, it still reports update available

Comment 1 Neal Gompa 2021-04-15 16:17:28 UTC
I'm pretty sure we haven't changed this logic recently: https://github.com/hughsie/PackageKit/blob/54a616b8edb8391f90ae183989bd98aa87e26b14/backends/dnf/pk-backend-dnf.c#L236-L246

I'm not sure how we actually trigger expiration on rpmdb change...

Comment 2 Ben Cotton 2021-04-15 16:49:06 UTC
I can reproduce this behavior on F33 and F34

Comment 3 Milan Crha 2022-03-01 15:59:58 UTC
I guess it's a libdnf bug. The libdnf/dnf-context.cpp installs a file monitor on

    /* setup a file monitor on the rpmdb, if we're operating on the native / */
    if (g_strcmp0(priv->install_root, "/") == 0) {
        rpmdb_path = g_build_filename(priv->install_root, "var/lib/rpm/Packages", NULL);

but my Fedora 35 has no such directory, I have only `/var/lib/rpm/`, where the `rpmdb.*` files are stored.

Comment 4 Neal Gompa 2022-03-02 09:49:00 UTC
This has been broken since Fedora 33 when we changed the rpmdb to SQLite. It's even more broken now in Fedora 36 now that the rpmdb has moved to /usr/lib/sysimage/rpm.

Comment 5 Milan Crha 2022-06-16 10:19:28 UTC
I suggest to close this one in favor of this:
https://github.com/rpm-software-management/libdnf/pull/1542

Comment 6 Ben Cotton 2023-04-25 16:42:01 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
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 '36'.

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 36 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 7 Ludek Smid 2023-05-25 18:53:39 UTC
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16.

Fedora Linux 36 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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