Dnf5 is not ignoring case distinctions while working with groups

I try to work with dnf5 since longer.

Found out that working with groups is not backwards compatible with dnf4

Example:

sudo dnf group install Multimedia #works with dnf4 but not with dnf5
sudo dnf group install multimedia #works with both

It looks like that the group command in dnf5 works different and is using just small letters, because of the package naming, right?

My question is, is it better to break some future desired behavior of dnf5 or do we distinguish in manuals/tutorials the differentiated spelling?

So or so, in the transition period we will have some unpleasantries.

I reported already same behavior with dnf list:

Especially the group “multimedia” can be misleading as it is defined as

<group>
    <id>multimedia</id>
    <_name>Multimedia</_name>
    <_description>Audio/video framework common to desktops</_description>
    <default>false</default>
    <uservisible>false</uservisible>
    <packagelist>
...

Quoted from https://pagure.io/fedora-comps/blob/main/f/comps-f41.xml.in.

For most commands you can use either the “id” name as well as the “_name” name. For most groups, the “_name” will contain spaces as well as being in title case.

As I understood while reading more on github DNF core commands - tracking issue · Issue #429 · rpm-software-management/dnf5 · GitHub shows that dnf5 just takes the ID while being strict small, right.

And here the DNF5 docs and the parameter where is set to none:

Goal structures and enums — dnf5 documentation

This means just searching for ID and not including the name.

To install, dnf5 not allows the “_name” field, because it is also bound to the locale, what means it can be different in several languages. The Id is unique and installing a package is for every locale using the same name.

This means, we have to go thru the documentation and clean the commands up just using by group installs just using the id while this might be just in small characters.

For example

dnf5 group {install|remove|upgrade} [options] <group-spec>...

uses the term group-spec which is defined in man dnf5-specs

GROUPS
       <group-spec>  allows  one  to select (environment) groups a particular operation
       should work on. It is a case insensitive string (supporting globbing characters)
       that is matched against a group's ID, canonical name and  name  translated  into
       the current LC_MESSAGES locale (if possible).

It really looks like a copy of dnf4 to dnf5, this not means it has to be this way in dnf5!
When we upgrade Fedora it is a common practice to copy the Manual and change it for the newer version, to fit the changes we made.

dnf4 man page:

SPECIFYING GROUPS
       <group-spec>  allows  one  to  select (environment) groups a particular operation should work on. It is a case insensitive string (supporting globbing characters) that is matched against a group's ID, canonical name and
       name translated into the current LC_MESSAGES locale (if possible).

The intention of dnf5 is not to have a copy and fully downwards compatibility to dnf3/4. The objective of it was to keep it slim, make it faster and also slightly different. Simply better as we had it before.

I linked an example how to “keep it slim” while using not redundant code for different commands.

We do have a transition time to keep it compatible with the lower versions on Fedora, just as long we have both versions installed on the system. This seams to be the case when you upgrade from a older Fedora version.
The new dnf5 command will be named dnf and the package has just a sim-link for dnf4 command where points to dnf-3, for users with the preference for dnf4.
Checking F41 pre release still contains python3-dnf.noarch package installed. I guess with the release of F43 this will not be the case anymore when F41 will be EOL.

The whole change to dnf5 is quite a complex process. So helping the Devs to make it better would mean, changing “Man Pages” before make it dnf4 compatible.

The thing is: Only the devs know what changed and can determine if what is written in the man page agrees with the intended behavior. That being said, the dnf5 manpages are way better than the previous version.

1 Like