Summary: | sys-devel/crossdev-20140917 creates invalid make.conf | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Florian Kluge <gentoo> |
Component: | [OLD] Development | Assignee: | Embedded Gentoo Team <embedded> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | gentoo, haubi |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch for emerge-wrapper
emerge --info |
Created attachment 388744 [details]
emerge --info
For a probably more straightforward patch: --- a/wrappers/emerge-wrapper +++ b/wrappers/emerge-wrapper @@ -122,10 +122,9 @@ MAIN_REPO_PATH=$(portageq repositories_configuration / | gawk ' if ($1 == "main-repo") { main_repo = $NF } else if ($1 ~ /^\[/) { - locs[repo_name] = loc repo_name = gensub(/\[([^\]]*)\]/, "\\1", "", $1) } else if ($1 == "location") { - loc = $3 + locs[repo_name] = $3 } } END { print(locs[main_repo]) } normally we'd dupe newer reports to older, but i already fixed & pushed a commit referencing the new bug, so oh well *** This bug has been marked as a duplicate of bug 546748 *** |
Created attachment 388742 [details, diff] patch for emerge-wrapper I tried to create an arm-none-eabi cross toolchain on my netbook. While this worked on my PCs, there are some issues on the netbook. There, I noticed that the /usr/arm-none-eabi/etc/portage/make.conf contained at least one problematic setting, e.g. ACCEPT_KEYWORDS=" ~ ". I could trace this problem to the emerge-wrapper script where the variable MAIN_REPO_PATH is determined: MAIN_REPO_PATH=$(portageq repositories_configuration / | gawk ' { if ($1 == "main-repo") { main_repo = $NF } else if ($1 ~ /^\[/) { locs[repo_name] = loc repo_name = gensub(/\[([^\]]*)\]/, "\\1", "", $1) } else if ($1 == "location") { loc = $3 } } END { print(locs[main_repo]) } ') On the netbook, portageq outputs: [DEFAULT] main-repo = gentoo [crossdev] location = /usr/local/portage masters = gentoo priority = 0 [gentoo] location = /usr/portage masters = priority = -1000 sync-type = rsync sync-uri = rsync://rsync.europe.gentoo.org/gentoo-portage As the [gentoo] section comes last in this output, gawk fails to store its location, which finally somehow leads to the strange ACCEPT_KEYWORDS variable. Storing the loc variable at the end of the script fixes the problem (see attached patch).