Currently this will apply to Cooker installations and for Lx 4 ALPHA/BETA until repos are split and we then have Lx 4.0 repos.

Among the changes is switching from urpmi/rpm5.org to dnr/rpm.org. For most of us users we don’t need to be concerned about the rpm part that is just different versions of rpm and maintained by different people, this will affect developers but users likely won’t notice anything different. The change from urpmi to dnf will be noticed by users as the commands will be different. Users can find most anything they need with ‘dnf --help’. For more information ‘man dnf’ should do it.

Anyway currently the repos as installed are not quite logical and what a user should have so we need to edit the repos. They are located in the directory ‘/etc/yum.repos.d’. You can use whatever is your preferred text editor, for this demo I’ll use ‘nano’ which is simple and easy enough for the average Linux Monkey.

Why so many? Devs in their infinite wisdom have included both Cooker and Lx 4 repos even though Lx 4 repos do not exist yet. Also there are source repos and i686 repos for both Cooker and Lx 4. Users will only need i686 for installing 32 bit software and most users will never use source repos.

Next if I run ‘dnf --refresh upgrade’ the command for system upgrade I will see these enabled:

So we see we have a lot of non-free stuff enabled and no contrib or restricted, not so good. Also we have ’ OpenMandriva 4.0 - x86_64’ and ‘OpenMandriva 4.0 - x86_64 - Updates’ enabled even though those do not exist. So lets disable those.

The way the repos are organized is that there is one file each for main, contrib, non-free, and restricted per arch. The main ones do not say main they will just say the arch so the file ‘openmandriva-x86_64.repo’ is for everything Lx 4 main including release, updates, testing and debug repos. So we need to edit that file to disable main release and main updates.

Next I’m going to edit the 4 x86_64 repos so that the release repo is enabled and all others are disabled. Why? Users don’t need updates or testing because they are empty. No one needs debug repos unless they are debugging something. If you want to confirm just copy and paste some of the URL’s for the files to your browser and see for yourself. There are 4 files to edit:

You want all of them to have for the release repo (the first one in each list, read the URL) to say ‘enabled=1’ and everything else to say ‘enabled=0’. I’ll post screen shots of the ‘/etc/yum.repos.d/cooker-nonfree-x86_64.repo’ before and after as it is the one that will have the most changes.

Once you get in to this and actually read what is in the files, most importantly what is in the URL’s this will all start to make sense.

Here’s hoping this helps some of you and does not confuse people.

Remember:In Cooker you do not need any ‘updates’ repos. Why? They are empty. Nothing in them. (This is the opposite for any Official release like Lx 3 or Lx 4, for those updates repos are essential to update your system.) Testing repos are rarely used in Cooker and generally can be ignored unless prompted by a developer regarding a specific issue. Debug repos are only needed if prompted by a developer for debugging a Bug.

Note:It would be great if any of you see any errors or any way to make this better to let me know or post here.

Generally it is considered “best practice” in OM Lx to keep i686 repos disabled on x86_64 systems and only enable if you really need them to install or update 32-bit software. Most users won’t need any 32-bit software. Remember that anything that isn’t developed for 64-bit now a days is about 10-15 years behind the times. I would be very wary of any developers that far behind.

It is known that our community maintained contrib repo is not at all well maintained at this time. Frankly there are a lot of packages that won’t install or won’t work. Anything that does work users are welcome to use.

Note: It is perfectly OK and possible to have a working system with only main/release repo enabled at this time. That is in this file /etc/yum.repos.d/cooker-x86_64.repo. It is the first thing in the list so you need enable only the first one. Like cooker-x86_64.repo.txt (1.5 KB)

It is really useful to know where repos config files are placed into the system but it is not really comfortable to edit them by hand. In fact dnf is able to handle some simple operation on repositories.

That is useful. On the other hand to be honest what I wrote is what I learned in Fedora Core 3 & 4 years ago.

I’ll have to get used to dnf config-manager command. That will be very useful after repos are split and we need to tell a user how to install a package or package group form testing repos. FWIW after repos are split we will have the familiar release, updates, testing, and debug lists for each repo category (main, contrib, non-free, and restricted) as we have had forever in Mandrake/Mandriva/OpenMandriva. And as before user would normally enable (if not automatically enabled) both release and updates of which ever catagories they choose. Things are being changed such that it should be more possible to not have contrib or non-free enabled in particular if a user wishes so.

Well I am totally new about dnf so i liked your posts about most common commands on this and I decided to contribute with some other IMHO useful everyday use commands I discover in my own learning process.

Actually I have not a clear idea about how to make this. I only know how to add a new repository in general:

It is just an example as close as possible to the everyday use with a stable version rather than a command d to copy and paste in a test environment. Of course I used cooker repository because 4.0 one is still empty.

enable.txt (82 Bytes)disable.txt (2.2 KB)
I have limited bandwidth at home and do updates on another network elsewhere. I have disabled timers, uninstalled dnfdragora and KDE discover in Fedora and it still would go online and update repository metadata running my account over my bandwidth limit.
After studying documentation and finding more related timers that could cause it to still update, I finally decided to design two scripts to disable repos after updates, and enable repos before updating. By keeping the repos disabled, it don’t go online downloading anything.
I adapted same system with OpenMandriva and don’t need to uninstall any Software discovery applications anymore. The scripts are called “enable.sh” and “disable.sh”, so before going to apply updates I issue command: sudo bash to get root prompt, then ./enable.sh, after updates completed I issue command: ./disable.sh. Both scripts are in my user’s home directory.

The reason I mention this, is because it’s a simple one word command to enable desired repos and a one word command to ensure all repos are disable. mandian recommends: “abf-downloads should be disabled by hand too”. I disagree, have a look at the commands in the scripts.

Does that work for downloading repository metadata? It’s not updates that use up my bandwidth, it’s checking for updates that is the problem. I have many operating systems, need to keep control. My best option for high speed internet is through my phone, 4GB per month. Anyway, my previous post is about how to enable or disable repos with a single command rather than the time consuming “edit one at a time by hand”.

When I decide to do updates, I hit the up scroll key till the command below shows up, then I hit the enter key, it will enable repos, auto upgrade and disable repos without typing anything because that command is in bash history.

[root@jo-pc jo]# ./enable.sh && dnf -y upgrade && ./disable.sh

Whether updates should be downloaded when they are available, by
dnf-automatic.timer. notifyonly.timer, download.timer and
install.timer override this setting.
download_updates = no