~100 repos listed in Discover settings

When opening Discover and going to Settings, there is a huge list of approximately 100 repos. If a newbie sees this, they tend to really hose their repos. Once this is done, it is a major problem to help them fix it, as they often cannot connect to any repos to do a sudo dnf reinstall distro-release-repos and @ben79 , @rugyada and I have to walk them through a painful process to fix it all by hand. This is a frightening thing for the newbies. Any way around it is a good thing.

Discover reads every file in /etc/yum.repos.d and uses this to populate the list. This is a big problem. I do realize that all of the repo files need to be there, so that if a user changes their Update Channel, the needed repos are already there.

  1. Is there a way to change the Backend, so that Discover does not see our repos? This would only allow Discover to see the KDE Store, Flathub and the Vendor repos for firmware. This is what Discover is good at. I don’t want to remove Discover.

  2. is there a way to place a backup copy of /etc/yum.repos.d in /etc/skel/yum.repos.d and a script that we can have a user to run that would automatically restore these critical files without a connection to the repos?

Both of these things would be a big help. They do not have to be done at the same time. They can be separate projects.

Newbie Warning!

Never use this to modify your repos. It will break your system.

1 Like


:grin:


Well, a quick and dirty workaround, to avoid the ~100 repos listed (x86_64 arch):

Backup the original files:
cp -r /etc/yum.repos.d $HOME

Then:
sudo rm /etc/yum.repos.d/*.repo

Download this file:
yum.repos-minimal.tar.gz.txt (1,8 KB)
(remove the fake .txt extension)

Extract archive yum.repos-minimal.tar.gz, for example in your Downloads folder

For Rock system:
cd ~/Downloads/yum.repos-minimal/yum.repos-clean-rock
sudo cp *.repo /etc/yum.repos.d/

For ROME system:
cd ~/Downloads/yum.repos-minimal/yum.repos-clean-rome
sudo cp *.repo /etc/yum.repos.d/

,
sudo dnf clean all;dnf clean all
sudo rm -rf /var/cache/PackageKit/* /var/cache/app-info/*
sudo pkcon refresh force

,
The above steps will result in all the relevant repositories enabled (main, extra, restricted, non-free).

If you prefer to keep only rock (for rock systems)
just copy file openmandriva-rock-x86_64.repo

or rolling (for ROME systems)
just copy file openmandriva-rolling-x86_64.repo

Who didn’t see that coming?

3 Likes