Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated environment names in dnf5 environment list #1502

Open
bc-lee opened this issue May 17, 2024 · 0 comments · May be fixed by #1503
Open

Duplicated environment names in dnf5 environment list #1502

bc-lee opened this issue May 17, 2024 · 0 comments · May be fixed by #1503

Comments

@bc-lee
Copy link

bc-lee commented May 17, 2024

I encountered duplicate environment names when running the dnf5 environment list command. This might be due to upgrading Fedora 40 from an older version, as indicated by the following output:

$ dnf5 environment list
Updating and loading repositories:
Repositories loaded.
ID                                Name                                Installed
basic-desktop-environment         Basic Desktop                              no
budgie-desktop-environment        Budgie Desktop                             no
cinnamon-desktop-environment      Cinnamon Desktop                           no
cloud-server-environment          Fedora Cloud Server                        no
custom-environment                Fedora Custom Operating System             no
deepin-desktop-environment        Deepin Desktop                             no
developer-workstation-environment Development and Creative Workstatio        no
i3-desktop-environment            i3 desktop                                 no
infrastructure-server-environment Infrastructure Server                      no
kde-desktop-environment           KDE Plasma Workspaces                      no
lxde-desktop-environment          LXDE Desktop                               no
lxqt-desktop-environment          LXQt Desktop                               no
mate-desktop-environment          MATE Desktop                               no
minimal-environment               Minimal Install                            no
phosh-desktop-environment         Phosh Desktop                              no
server-product-environment        Fedora Server Edition                      no
sugar-desktop-environment         Sugar Desktop Environment                  no
sway-desktop-environment          Sway Desktop                               no
web-server-environment            Web Server                                 no
workstation-product-environment   Fedora Workstation                        yes
workstation-product-environment   Fedora Workstation                         no
xfce-desktop-environment          Xfce Desktop                               no
$ dnf5 environment info workstation-product-environment
Updating and loading repositories:
Repositories loaded.
Id                   : workstation-product-environment
Name                 : Fedora Workstation
Description          : Fedora Workstation is a user friendly desktop system for laptops and PCs.
Order                : 2
Installed            : True
Repositories         : @System
Required groups      : container-management
                     : core
                     : desktop-accessibility
                     : firefox
                     : fonts
                     : gnome-desktop
                     : guest-desktop-agents
                     : hardware-support
                     : libreoffice
                     : multimedia
                     : networkmanager-submodules
                     : printing
                     : workstation-product
Optional groups      : base-x
                     : domain-client

Id                   : workstation-product-environment
Name                 : Fedora Workstation
Description          : Fedora Workstation is a user friendly desktop system for laptops and PCs.
Order                : 2
Installed            : False
Repositories         : fedora, updates
Required groups      : core
                     : hardware-support
                     : networkmanager-submodules
                     : fonts
                     : multimedia
                     : printing
                     : guest-desktop-agents
                     : libreoffice
                     : desktop-accessibility
                     : firefox
                     : gnome-desktop
                     : container-management
                     : workstation-product
Optional groups      : base-x
                     : domain-client

Considering that duplicate environment names can be confusing for users, it might be beneficial to implement a deduplication mechanism within the dnf5 environment list command.

dnf5 version: 5.1.17-1.fc40

bc-lee added a commit to bc-lee/dnf5 that referenced this issue May 18, 2024
Previously, `dnf5 environment list` would print duplicate environment
with the same id and name. It would be confusing for the user to see
duplicate environment names. This patch introduces de-duplication for
the environment list print feature to merge duplicate environment
entries. The original order of the environments is preserved by
assigning an index value to each environment entry.

Fixes: rpm-software-management#1502
@bc-lee bc-lee linked a pull request May 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant