WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
697 stars 51 forks source link

DNF broken after upgrading DNF #123

Closed xasx closed 3 years ago

xasx commented 3 years ago

Describe the bug After upgrading DNF to the latest version in an existing installation or a completely new installation, DNF is broken and you cannot install any new packages anymore.

To Reproduce Steps to reproduce the behavior:

  1. Install fedora remix for wsl from the release page
  2. Upgrade dnf via dnf upgrade dnf
  3. Upgrade the remaining packages via dnf upgrade
  4. See error

Expected behavior DNF can be run without any problems to update packages.

Screenshots/logs

error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): locking protocol
error: cannot open Packages index using sqlite - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 201, in user_main
    errcode = main(args)
...
  File "/usr/lib/python3.9/site-packages/dnf/rpm/miscutils.py", line 90, in checkSig
    raise ValueError('Unexpected return value %r from hdr.sprintf when checking signature.' % siginfo)
ValueError: Unexpected return value 'RSA/SHA256, Sun 31 Jan 2021 05:41:17 AM CET, Key ID 1161ae6945719a39' from hdr.sprintf when checking signature.

The complete console output of a fresh installation with the above sequence of steps is attached here: dnf-upgrade-dnf.txt

Additional context

Basic Troubleshooting Checklist

[x] I have searched Google for the error message. [ ] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [ ] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [x] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues. [x] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset. [ ] I have disabled and re-enabled WSL in Windows Features. [ ] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

WLinux Version

34.4.3.0

Windows Build

(de) Betriebssystemname: Microsoft Windows 10 Pro Betriebssystemversion: 10.0.19042 Nicht zutreffend Build 19042 Betriebssystemhersteller: Microsoft Corporation Betriebssystemkonfiguration: Mitglied der Domäne/Arbeitsgruppe Typ des Betriebssystembuilds: Multiprocessor Free

crramirez commented 3 years ago

Hello @xasx ,

Please run the upgrade.sh script to solve the issue.

Regards, Carlos

xasx commented 3 years ago

Gracias @crramirez, that did it.

I am curious: which part of the script is responsible for fixing the issue?

crramirez commented 3 years ago

The part around gpgcheck=0. I don't know exactly what changed but looks like the dnf update is using an unsupported function in the WSL1 kernel. You can see also in the script that the fix only applies to WSL1.

We recommend that you always use upgrade.sh instead of dnf update. Because we include fixes and improvement in this script.

Happy that this solved your issue. Next week we will release a new image with this fix included.

Regards, Carlos

xasx commented 3 years ago

Just found that too, after adding external repos.

Thx for your support.

crramirez commented 3 years ago

Hello @xasx ,

We made a release with this fix built in: https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/releases/tag/34.5.6

Regards, Carlos