Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 474590 - app-portage/eix-0.28.5 incompatible with /etc/portage/repos.conf
Summary: app-portage/eix-0.28.5 incompatible with /etc/portage/repos.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-24 10:41 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2013-07-11 04:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2013-06-24 10:41:18 UTC
/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
Comment 1 Martin Väth 2013-06-24 14:54:01 UTC
(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).
Comment 2 Arfrever Frehtes Taifersar Arahesis 2013-06-24 15:09:03 UTC
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.)
Comment 3 Arfrever Frehtes Taifersar Arahesis 2013-06-24 23:47:40 UTC
(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.
Comment 4 Martin Väth 2013-06-26 14:30:54 UTC
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...
Comment 5 Martin Väth 2013-06-26 14:37:03 UTC
(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).
Comment 6 Arfrever Frehtes Taifersar Arahesis 2013-06-26 20:30:30 UTC
(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
Comment 7 Martin Väth 2013-07-11 04:46:50 UTC
Closing since eix-0.29.0 is in tree