$> mkdir /etc/portage/make.conf $> eix FOO >> bool VarsReader::read(const char*): Can't map file '/etc/portage/make.conf' $> eix-update >> Reading Portage settings .. >> bool VarsReader::read(const char*): Can't map file '/etc/portage/make.conf' eix should gracefully handle this situation, or print a warning to cerr and continue (or fail with an appropriate error message) Reproducible: Always
Created attachment 274289 [details, diff] Patch to prevent mmaping of dirs Without knowing what that code is supposed to do, this seems to fix it.
Hi, what use case is there for /etc/portage/make.conf/ ?
(In reply to comment #2) > Hi, what use case is there for /etc/portage/make.conf/ ? I would be also interested in that: If portage would support it, there would definitely be some use cases, and eix should also support it. However, I just tried and saw that also portage does not support it (and spits a warning). Since /etc/portage/make.conf being a directory is also considered a misconfiguration by portage, it appears strange to build extra code into eix for that situation. I think the generic error message (Can't map file '/etc/portage/make.conf') is understandable enough for such a strange misconfiguration. If portage changes and supports /etc/portage/make.conf as a directory, then also eix should change, of course.
1./ My use-case is that I created the directory so that I could source common elements from them in my /etc/make.conf. (computer1) echo "source /etc/portage/make.conf/common" >> /etc/make.conf echo "source /etc/portage/make.conf/computer1-specific" >> /etc/make.conf (computer2) echo "source /etc/portage/make.conf/common" >> /etc/make.conf echo "source /etc/portage/make.conf/computer2-specific" >> /etc/make.conf I picked the name of the folder to describe its contents, and wasn't expecting that to break eix. 2./ The use-case is irrelevant, programs shouldn't crash when they get into predictable, but unexpected situations. A more graceful reaction would be; "WARNING: /etc/portage/make.conf is a directory! This is unsupported, and your USE-flags may be shown incorrectly in the following output" (eix-output as normal) Afaik, /etc/portage/make.conf is unsupported by portage; why is it a hard-coded path in eix?
(In reply to comment #4) > Afaik, /etc/portage/make.conf is unsupported by portage; why is it a hard-coded > path in eix? That is not correct. /etc/portage/make.conf (as a file) *is* supported by portage and is the preferred location for make.conf in the future.
I'd suggest using /etc/portage/make.conf.d/ for your custom setup. Closing bug for now.