Question regarding DNF5

Question regarding DNF 5

Will the current dnf python binary still remain on a new install of Fedora 41??? I know that if I update from 40 to 41 it’ll still be there (at usr/bin/dnf-3) but what about a completely new install?? Will it also be there on a fresh install?

https://fedoraproject.org/wiki/Changes/SwitchToDnf5

If you read through the history on that link you provided it should provide the best answer available. Those of us who are not developers for dnf5 would only be guessing as you seem to be.

The only certain answer I may provide would be to suggest following rawhide and when it is branched to f41 then see what is actually included. When it becomes beta that is the most certain place to find your answer.

From reading the linked info it would appear that dnf and dnf5 may both be included in f41

That’s the impression I got as well. Would love if someone involved could comment but anyways thanks for answering!

When not you can install it wit the sub-package python3-dnf!

:link: Provider of the dnf command

This change proposes to switch the current provider of the /usr/bin/dnf symlink from dnf to dnf5. Currently, the symlink target is /usr/bin/dnf-3, provided by the dnf sub-package, python3-dnf. Upon implementation of this change, the symlink will point to /usr/bin/dnf5, provided by the dnf5 package.

:link: Prepare the upgrade path

The dnf5 package, serving as the new provider of the /usr/bin/dnf symlink, will obsolete the dnf package starting with Fedora 41. Upon the release of this dnf5 package, upgrading the system or installing dnf5 will replace the existing dnf package on the system. Additionally, the dnf5 package will provide a /usr/bin/yum symlink for backwards compatibility and the dnf-automatic command will be replaced by the new dnf5 plugin.

1 Like

Well I’m just asking this so as to know if I’ll have to remove the current dnf binary from the system after upgrading to f41. If it remains on the system after a fresh install of f41, then I’ll keep it after upgrading.

In the Wiki it is written quite complicated, but when you read it about 3 or 4 times it gets clear:

They talk about the symlink /usr/bin/dnf and the actual pakage dnf which has a subpackage named python3-dnf with that what you looking for.

When you want to be compatible with the old standard you will have to use /usr/bin/yum symlink and check if the actual package dnf is installed.

The new package is named dnf5 and will remain this way. The symlink /usr/bin/dnf will point to the library from dnf5 from F41 on.

If you not need compatibility to yum anymore, you can just remove the dnf package. Now or just after migration to F41. If you do it now just remember to change the symlink to the dnf5 library.

lrwxrwxrwx. 1 root root    5 mar 28 21:00 /usr/bin/dnf -> dnf-3

Is it safe to use dnf5 now or just wait for F41 to come out?

❯ which dnf5
/usr/bin/dnf5


❯ dnf --version
4.21.0
  Installed: dnf-0:4.21.0-1.fc40.noarch at Wed 17 Jul 2024 01:49:32 PM GMT
  Built    : Fedora Project at Wed 03 Jul 2024 06:25:35 PM GMT

  Installed: rpm-0:4.19.1.1-1.fc40.x86_64 at Sun 14 Apr 2024 10:58:31 PM GMT
  Built    : Fedora Project at Wed 07 Feb 2024 03:55:53 PM GMT

❯ cat /etc/os-release | grep name
NAME="Fedora Linux"
VERSION_CODENAME=""
PRETTY_NAME="Fedora Linux 40 (KDE Plasma)"
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
1 Like

It is save, you can have both installed.
If you not get along with dnf5 just use dnf equal dnf4 in F40.

Welcome to Fedora @eribertto

Nice, good to know. Thank you :slight_smile:

1 Like

Just don’t switch back and forth. dnf4 and dnf5 does not share history, and the history is used to determine if a package can be autoremoved or not.

1 Like

What a simple alias resolves dnf=/usr/bin/dnf5 :slightly_smiling_face:

1 Like

Also note that plugins, etc., for previous versions of dnf might not work for dnf5 for the time-being.

https://fedoraproject.org/wiki/Changes/SwitchToDnf5#dnf-plugins-core

I can make an alias of dnf to point to dnf5. That’s the most logical step to do.

Exactly (wiki was last edited on 10 May 2024, at 18:24):

:link: dnf-plugins-core

Installed plugins will persist on the system and remain functional using the dnf4 binary from the python3-dnf package.

With the exception of the system upgrade plugin, all essential plugins are now implemented in dnf5 and are provided by the dnf5-plugins package or dnf5 directly.

:link: dnf-plugins-extras

Installed plugins will persist on the system and remain functional using the dnf4 binary from the python3-dnf package.

Porting the functionality to dnf5 is currently of low priority, and its implementation depends more on community involvement. The functionality of the Snapper plugin is already covered by the dnf5 actions plugin.

How to test, might be helpful for users where do have an environment for it.

How about the software app in Gnome, it is in sync with dnf4?
Will the dnf4 history migrated to dnf5 when changing to F41?
Maybe the dnf5 team knows some info’s about the new status.

I generally use the system upgrade Plugin, to upgrade my system to a new release.

No, and never has been. Packagekit and dnf have differing cache and metadata storage.

I don’t suspect so . New installs should be using dnf5 only so they would not have to transition. Upgraded installs would still have the dnf4 history, and should still have the use of the older version of dnf if the user chooses to do so.

I intend to wait a while before upgrading and even then will still use the older dnf until I am ready for a new clean reinstall. I may test dnf5 a bit on a non-critical system as I make the transition.

2 Likes

From a test I did:

It will extract information from the dnf4 history about whether a package is user installed or not. But only once when running the dnf5 command for the first time. That would prevent surprises from the autoremove feature. The history itself is not migrated.

2 Likes