Unable to use DNF - fedora repo 'broken'

I’ve let my F38 system fall behind due to health issues, and am now attempting to get it up to current release. Before anyone says it, I’m sure ‘fedora’ repo isn’t broken, but my ability to access the repo most definitely is.

When I issue the DNF upgrade refresh command I get a weird response

[root@nas02 ~]# sudo dnf upgrade --refresh
Fedora 38 - x86_64 6.9 kB/s | 1.4 kB 00:00
Error: Failed to download metadata for repo ‘fedora’: Cannot prepare internal mirrorlist: Parse error at line: 1 (Extra content at the end of the document
)
[root@nas02 ~]#

If I use wget to attempt to pull the referenced link, I get the following:

[root@nas02 ~]# cat ‘metalink?repo=updates-released-f38’
< ?xml version=“1.0” encoding=“utf-8”?>
< metalink version=“3.0” xmlns=“http://www.metalinker.org/” type=“dynamic” pubdate=“Thu, 06 Jun 2024 03:37:47 GMT” generator=“mirrormanager” xmlns:mm0=“Infrastructure/Fedorahosted-retirement - Fedora Project Wiki”>
< !-- # either path=, or repo= and arch= must be specified

< /metalink>

DNF is only requesting with repo=updates-released-f38 and the repo is complaining that it wants arch= as well. Everything I’ve read suggests that the link being followed is in the /etc/yum.repos.d/fedora-updates.repo file, but that file’s content includes a &arch=$basearch modifier that is not being shown on the dnf verbose output.

metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch

I really hope there’s a quick and simple fix for this.

Your metalink appears correct.
Can you please post the content given with cat /etc/yum.repos.d/fedora-updates.repo

It should show in the first part something almost identical to this

$ cat /etc/yum.repos.d/fedora-updates.repo 
[updates]
name=Fedora $releasever - $basearch - Updates
#baseurl=http://download.example/pub/fedora/linux/updates/$releasever/Everything/$basearch/
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=1
countme=1
repo_gpgcheck=0
type=rpm
gpgcheck=1
metadata_expire=1h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

Those variables are created and used by dnf when it is launched. Maybe something in the config where dnf gets that value is not correct.

I’m going to sheepishly close this off - its working fine today.

[root@nas02 tmp]# sudo dnf upgrade --refresh
Fedora 38 - x86_64 18 MB/s | 83 MB 00:04
Fedora 38 openh264 (From Cisco) - x86_64 3.6 kB/s | 2.6 kB 00:00
Fedora Modular 38 - x86_64 4.4 MB/s | 2.8 MB 00:00
Fedora 38 - x86_64 - Updates 14 MB/s | 42 MB 00:03
Fedora Modular 38 - x86_64 - Updates 3.2 MB/s | 2.2 MB 00:00
google-chrome 15 kB/s | 3.6 kB 00:00
plexrepo 87 kB/s | 23 kB 00:00
RPM Fusion for Fedora 38 - Free 1.5 MB/s | 693 kB 00:00
RPM Fusion for Fedora 38 - Free - Updates 555 kB/s | 342 kB 00:00
RPM Fusion for Fedora 38 - Nonfree 564 kB/s | 263 kB 00:00
RPM Fusion for Fedora 38 - Nonfree - NVIDIA Driver 69 kB/s | 15 kB 00:00
RPM Fusion for Fedora 38 - Nonfree - Steam 7.7 kB/s | 2.1 kB 00:00
RPM Fusion for Fedora 38 - Nonfree - Updates 240 kB/s | 99 kB 00:00
Dependencies resolved.
Nothing to do.
Complete!
[root@nas02 tmp]#

I have no idea what the issue was, what changed, or what magic pixie dust was sprinkled where, but it ‘just works’ tonight.

1 Like