Can I merge dnf4's history w/ dnf5's?

Hi, as title suggests, can I?
It would be good to not having to switch between dnf4 and 5 when searching for a history of a package

The history for each package manager is stored in an SQLite database, but I would expect the schema definitions are different (or there would be no reason to have separate SQLite databases).

Short answer - not really.

Longer answer - you could create your own database, import both dnf4 and dnf5 tables into it and build a view over the top of both so that one query would read both tables… but you’d need to keep the data in it refreshed with updates from dnf5 and at the end of the day, could you really be arsed rather than just execute dnf4 history and if that fails to find anything, remove the 4.

Medium answer: Whip up a script to issue both history commands and amalgamate the answers together.

Gnome as KDE is using packagekit for their software Store. Unfortunately package-kit is not on Dnf5 yet.

This will happen soon. As you not gave the version and the DE you are using I do speak for F42 Workstation alias Gnome.

p.s.
Dnf5 is a rewrite and not based 100% on dnf4. Mixing up databases would give you a lot of headache.

I propose using the software app just for flatpack and the rest do in dnf. To not get to much a mix up, i try to fist update with dnf and then I do check in Software if there are still updates. So I know this are not managed by dnf, and install them with Software app.

1 Like

The other likely source of dnf4 installs is the plugin that does the “Command not found … do you want to install it?” thing in the terminal.

1 Like

Just say no or turn it of … i do not remember how the app is called.

It’s pk-command-not-found and it’s hooked into the shell through functions in /etc/profile.d/PackageKit.sh

There are a few ways of disabling it.

Personally I modified the command_not_found_handle function in that script to set local runcnf=0 on its first line, so it will never offer to install anything.

2 Likes

I believed there is a package which handles this … I know it from ankursinha he commented once. I am terribly bad in memorize information which I use once or twice a year.

However this was still with DNF4 …

p.s.
sorry ankur for pinging you

$ rpm -qf /usr/libexec/pk-command-not-found
PackageKit-command-not-found-1.2.8-9.fc42.x86_64

So yes you could also just uninstall that package.

2 Likes

Yeh, that’s the package:

1 Like