dnfdragora
dnfdragora copied to clipboard
RFE: Improvement to repositories management
Duplicated from Mageia downstream bug filed by @papoteur-mga:
Description of the problem:
A newbie can be lost with a long list of repositories, for example when he want enable tainted repository.
I suggest that the screen to enable/disable repositories can be of two levels, one standard and one advanced. I suggest that the repositories are displayed according two skill levels, for chosing which will be enabled. In the standard level, only the specific arch would be displayed, without debuginfo, nor source. In expert level, all repositories would be displayed. the display would be a table combined with tabs.
It would be nice to have some additional repository information from dnfdaemon, such as if a repo is mandatory for distro (core, update, etc) or optional (backport, non-free, from copr, etc) in such a way the "normal" user could enable/disable only those that are optional. Mandatory ones could be shown in expert mode instead. Sources and debug repository must be managed as exception though, debug as expert, source never shown maybe?
@anaselli I suspect that might not be something that dnfdaemon can or should know, as DNF certainly doesn't care. This is more of a frontend usability thing, so it makes sense handle it at our level.
I don't know exactly where the repos names are defined. But I presume that:
- repos names are specific to a distro;
- repos names are constant during a release life. Thus, we can have a config file (like yaml format), or adding information to a present config file, which is to provide or select with each package at distro level. At the moment, I have done a draft with a definition in the code: https://github.com/papoteur-mga/dnfdragora/blob/master/dnfdragora/dialogs.py#L186
@papoteur-mga that sounds good, i would change disabling with expert-mode since it's in dnfdragora and set it in config file, then look at ui.py self.config to see how it is used :)
@anaselli OK, I will propose a revision to manage a config file. However, I don't understand well what you mean with: "i would change disabling with expert-mode since it's in dnfdragora"
self.simplified = { 'categs':[{'name':'Core','disabling':False,'repos':['mageia-x86_64','updates-x86_64','mageia-i586','updates-i586'] }, {'name':'Nonfree','disabling':True,'repos':['mageia-x86_64-nonfree', 'updates-x86_64-nonfree', 'mageia-i586-nonfree','updates-i586-nonfree'] }, {'name':'Tainted','disabling':True,'repos':['mageia-x86_64-tainted','updates-x86_64-tainted','mageia-i586-tainted',' updates-i586-tainted'] }, ] }
I mean disabling: False with expert: True for instance, in such a way configuration file shows what is shown in expert mode, disabling seems that the repo is disabled to me.
I need to check your code however to understand why you added category name, I would have expected just a {repo-name, view-mode}, I'm not sure that could fit with fedora mirror list.
@Conan-Kudo any ideas on that?
The mean of the above table, now in a config file, is to define 3 options, Core, Nonfree and Tainted which can be enabled by the user as a whole. Each option enable/disable the repos from the list which is given.
Now, I have not yet dealt with the state at start, to display the option as already enabled or disabled.
Any improvement here?
I had a look for differentiate standard repositories from added like Copr. I studied the content of the struture given by a Getrepo command from dnfdeamon. I found that Mageia's repositories use something in mirrorlist, but copr's field is null. Can this be a criteria to identify repositories which are not standard? If yes, I can thus keep them in the standard list. Papoteur
No, unfortunately. It's very possible for other repositories to be backed by a mirrorlist or metalink. For example, OBS RPM-MD repositories targeting Mageia 6 / Cauldron would have a mirror network.