Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 316907 - app-portage/eix: doesn't support escapes in make.conf
Summary: app-portage/eix: doesn't support escapes in make.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-24 11:58 UTC by Michał Górny
Modified: 2010-06-05 13:52 UTC (History)
1 user (show)

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


Attachments
Patch adjusting the config file reading to match Portage (eix-9999-portage-config-reading.diff,6.45 KB, patch)
2010-04-24 14:39 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-24 11:58:13 UTC
app-portage/eix fails to interpret my PORTDIR value from make.conf, and thus fails to add gx86 ebuilds to the database. This is due to use of '\n' escape sequence, which is supported (and required) by portage and not handled properly by eix.

eix configuration file parser should be modified to support escape sequences supported by portage.
Comment 1 Martin Väth 2010-04-24 13:32:06 UTC
Can you append a reference where this is suggested?
From what I know you should use a space or a (real) newline as a separator.
Moreover, it seems to be very strange how portage handles escapes:
"path1\npath2"  seems to be interpreted as "path1
path2"
Strangely, "path1\\npath2" also seems to be interpreted the same way,
but "path1\\\npath2" seems to be interpreted as 'path1\npath2'.
In other words: Escaping of escapes does not work in the "standard" manner.

Unless this strange behavior is documented somewhere, I do not think that I
will implement such crazy rules (which might depend wildly on the portage
version) in eix.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-24 13:38:17 UTC
I've discussed the issue with Zac, and portage is supposed to work that way. It is imitating 'echo -e' in bash, and yes, it's ugly and braindead. I am working on a patch right now, it should be ready in 1hr.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-04-24 14:39:43 UTC
Created attachment 229005 [details, diff]
Patch adjusting the config file reading to match Portage

Here it is. I think I got everything, including behaviour related to backslashes, newlines and variable expansion, exactly the same way Portage does. I've tested most of with with amounts of backslashes up to 9, and I'm pretty sure it works.

However, I don't know whether I've added enough EOF case handling.
Comment 4 Martin Väth 2010-04-24 15:15:19 UTC
Thanks for the patch.
It cannot direcly go into varsreaders.cc, because that function is
also used to interpret ebuild scripts and files like eixrc in
which backslashes should work the usual way.
So I will also have to include a new flag to make the patch active
only for portage's config files.
Comment 5 Martin Väth 2010-04-24 17:08:37 UTC
The modification (with new flag and several new states) is now in
eix' svn trunk (>=eix-0.20.5).
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-06-05 13:52:15 UTC
(In reply to comment #5)
> The modification (with new flag and several new states) is now in
> eix' svn trunk (>=eix-0.20.5).
> 

in tree