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

fedora-toolbox:39 uses dnf4 and dnf upgrade fails due to dnf version conflict #1337

Closed
awesomekyle opened this issue Jul 11, 2023 · 7 comments
Labels
1. Bug Something isn't working

Comments

@awesomekyle
Copy link

Describe the bug
DNF inside a registry.fedoraproject.org/fedora-toolbox:39 is still DNF4, but it tries to pull from rawhide repos, which assume dnf is version 5. This means that when running dnf upgrade in the toolbox, DNF fails with "Problem: The operation would result in removing the following protected packages: dnf"

Steps how to reproduce the behaviour

  1. toolbox create -d fedora -r 39
  2. toolbox enter fedora-toolbox-39
  3. Inside toolbox: sudo dnf upgrade
  4. See error

Expected behaviour
I would expect DNF to allow an upgrade.

Actual behaviour
DNF upgrade fails with error:

sudo dnf upgrade
Fedora rawhide openh264 (From Cisco) - x86_64                                                                                                                                                                        1.4 kB/s | 2.5 kB     00:01    
Fedora - Rawhide - Developmental packages for the next Fedora release                                                                                                                                                 29 MB/s |  71 MB     00:02    
Fedora - Modular Rawhide - Developmental packages for the next Fedora release                                                                                                                                        1.9 MB/s | 1.8 MB     00:00    
Error: 
 Problem: The operation would result in removing the following protected packages: dnf
(try to add '--skip-broken' to skip uninstallable packages)

Screenshots
N/A

Output of toolbox --version (v0.0.90+)
toolbox version 0.0.99.4

Toolbox package info (rpm -q toolbox)
toolbox-0.0.99.4-1.fc38.x86_64

Output of podman version

Client:       Podman Engine
Version:      4.5.1
API Version:  4.5.1
Go Version:   go1.20.4
Built:        Fri May 26 13:58:48 2023
OS/Arch:      linux/amd64

Podman package info (rpm -q podman)
podman-4.5.1-1.fc38.x86_64

Info about your OS
Fedora 38

Additional context

dnf --version output from within a fedora:39 container is DNF5 as expected:

[root@0241bf64df66 /]# dnf --version
dnf5 version 5.0.15
dnf5 plugin API version 1.0
libdnf5 version 5.0.15
libdnf5 plugin API version 1.0

Loaded dnf5 plugins:
  name: builddep
  version: 1.0.0
  API version: 1.0

  name: changelog
  version: 1.0.0
  API version: 1.0

  name: copr
  version: 0.1.0
  API version: 1.0

  name: repoclosure
  version: 1.0.0
  API version: 1.0

But within the fedora-toolbox:39 container, it's still DNF4, which seems to be the problem:

[root@c9b011fbc331 /]# dnf --version
4.15.0
  Installed: dnf-0:4.15.0-1.fc39.noarch at Mon Apr 10 15:13:01 2023
  Built    : Fedora Project at Thu Apr  6 08:16:49 2023

  Installed: rpm-0:4.18.1-1.fc39.x86_64 at Tue Apr 11 06:21:33 2023
  Built    : Fedora Project at Wed Mar 15 14:11:59 2023
@awesomekyle awesomekyle added the 1. Bug Something isn't working label Jul 11, 2023
@juhp
Copy link
Contributor

juhp commented Jul 11, 2023

Work is ongoing for the fedora-toolbox container image to be built in the main Fedora composes.
Please wait a little more.

@juhp
Copy link
Contributor

juhp commented Jul 11, 2023

I think you can try to dnf install dnf5 for example - I don't quite remember how I worked around this, though it was a while back.

@awesomekyle
Copy link
Author

Unfortunately replacing DNF doesn't work either:

❯ sudo dnf install dnf5
Last metadata expiration check: 0:00:30 ago on Tue 11 Jul 2023 08:03:59 AM EDT.
Error: 
 Problem: The operation would result in removing the following protected packages: dnf
(try to add '--skip-broken' to skip uninstallable packages)

The workaround I found is to use the -i fedora:39 and manually install the packages from https://github.com/containers/toolbox/blob/main/images/fedora/f39/extra-packages.

@juhp
Copy link
Contributor

juhp commented Jul 12, 2023

Yes I tried briefly too - I think I had installed dnf5 before it replaced dnf...
Another workaround would be to roll one's own image locally - it is not that hard to do.

@juhp
Copy link
Contributor

juhp commented Jul 12, 2023

@juhp
Copy link
Contributor

juhp commented Aug 25, 2023

fedora-toolbox:39 has been available now for a month and is updated with each F39 compose.

I think this should be closed now.

@debarshiray
Copy link
Member

Okay, closing! Thanks for sorting this one out, @juhp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants