layman
layman copied to clipboard
Allow adding repositories recursively
See https://bugs.gentoo.org/545568
overall, looks good. just the one configparser issue
How were you thinking of dealing with the main repo? in this case "gentoo"
We have been trying to get way from the main-repo configuration. I'll poke Zac to have a look at this, see what he thinks is the best way. I'm thinking in terms of portability to other distros, there are a bunch of them, ie: funtoo, sabayon, calculate,...
lgtm
I was thinking (about other distros) and figured out that there's no universal solution (apart from looking at repos.conf). And anyway, it just prompts before adding each repo, so the user will have to react (and willingfully accept the repo). Or we could just special case gentoo (as almost every overlay has it in masters).
oh, instead of hard coding the special case.
Why don't we add another config item for it. Then it is easily changed...
provided-masters:
it can be a list like the old overlays and some other variables in the config That should take care of Funtoo's new split repo stuff they are working on.
Done.
apart from looking at repos.conf
If it's acceptable to use the portage api, then something like this would work:
Python 3.4.5 (default, Mar 12 2017, 00:44:50)
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import portage
>>> 'gentoo' in portage.settings.repositories
True
From what I've seen, portage APIs are only used in a module or two (not in "core" layman).
Yeah, I tried to keep from using portage api's as much as possible. That way it would be easier to incorporate and.or use in different package managers. The news system is configurable to the point that a custom module could be used, but defaults to the portage API.
This looks really good now. Thank you Zac, my mail client (claws-mail) no longer self fetches unless I manually change directories, then back. So I missed notification of the changes.
I like it. Zac, by using the provided_masters config, it makes it possible for users to add masters not under layman control, not just the main "gentoo" repo.
I like it. Zac, by using the provided_masters config, it makes it possible for users to
add masters not under layman control, not just the main "gentoo" repo.
It you have a way to query the names of configured repositories then you don't need that. For example, the app-portage/gentoopm package provides a gentoopmq tool that can do it:
$ gentoopmq repositories
gentoo local python
Problems may arise in some corner cases when using gentoopmq API, seems to me, esp. when the user has several package managers installed, additionally, in case the downstream distro maintains their own version of the portage tree (named differently than 'gentoo', albeit kept in ~sync with the upstream tree). IIRC, funtoo does (or did) exactly that.
Funtoo is in the process of splitting the repository up into logical groups. That they feel would be better for maintaining things like a stable xorg. A user could then also exclude certain sub-repos they don't need. The split repos could then use branches for different stability stages instead of just {'',-arch,~arch, arch} We could eventually set up a means to specify the means to obtaining the installed list via a pkg manager similar to what I did for the news.