/etc/portage/repos.conf is the new way of configuring repositories for Portage. PORTDIR and PORTDIR_OVERLAY variables in /etc/portage/make.conf are deprecated. eix should use portageq (or Portage's Python API) or parse /etc/portage/repos.conf manually to get paths of repositories. # eix-update Reading Portage settings .. Building database (/var/cache/eix/portage.eix) .. Can't open /usr/portage/profiles/categories: No such file or directory # cat /etc/portage/repos.conf [DEFAULT] main-repo = gentoo [gentoo] location = /var/repositories/gentoo-x86 [local] location = /var/repositories/local priority = 0 # grep PORTDIR /etc/portage/make.conf # portageq portdir /var/repositories/gentoo-x86 # portageq get_repos / local gentoo # portageq get_repo_path / gentoo /var/repositories/gentoo-x86 # portageq get_repo_path / local /var/repositories/local
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #0) > PORTDIR and PORTDIR_OVERLAY variables in /etc/portage/make.conf are > deprecated. This is horrible news for eix... > eix should use portageq (or Portage's Python API) Not an option - much too slow. > parse /etc/portage/repos.conf manually eix has not yet a parser for such type of config files - the existing varsreader.cc is for shell-like syntax and is not trivial to extend in a way to recognize section headers. I am not sure whether I will find the time to implement a new parser (and the internal changes required for eix are much larger than only that rather trivial implementation). Anway, is there a description of the exact syntax and semantics available? (E.g. are any other commands available except for direct assignments of strings to "main-repo", "location", "priority"? Is there a quoting/escape mechanism for special characters?) Does EPREFIX or a similar variable influence the paths or are they really absolute? Moreover, what takes priority if the header of a section in repo.conf differs from the repo_name file, or is repo_name being deprecated, too? Which one will be stored in /var/db? (Of course, I can try all this, but it costs a lot of time, and if I should take the time to implement it, I would like to follow a "documented" way which is not expected to change in the next portage version).
General syntax is described in http://docs.python.org/3.3/library/configparser.html `man portage` describes repos.conf, but documentation is slightly incomplete. Portage ignores unrecognized attributes. Paths are absolute. (In reply to Martin Väth from comment #1) > what takes priority if the header of a section in repo.conf differs > from the repo_name file repo_name takes priority. (Portage will be fixed to print an error message in this case.)
(In reply to Martin Väth from comment #1) > what takes priority if the header of a section in repo.conf differs > from the repo_name file Error is printed and repository is unused since Portage 2.1.12.10 and 2.2.0_alpha185.
This is fixed in eix git master on BerliOS (>=eix-0.29.0) I suppose that in addition to the format you mentioned, an include directive will be available, since otherwise things like layman will break. Or perhaps that /etc/portage/repos.conf can be a directory. Anyway, the currently implemented parser in eix should already deal with all these cases corrrectly (it is only a simple extension of the previous varsreader.cc with added support for sections). This is not 100% compatible to portage, but eix never was so...
(In reply to Martin Väth from comment #4) > include directive s/include/source/ (I assume portage uses essentially the same parser as for /etc/portage/make.conf).
(In reply to Martin Väth from comment #4) > layman Discussion about layman and repos.conf interaction is in bug #474588. Portage uses configparser [1] for repos.conf / layout.conf and shlex [2] for make.conf. [1] http://docs.python.org/3.3/library/configparser.html [2] http://docs.python.org/3.3/library/shlex.html
Closing since eix-0.29.0 is in tree