sys-apps/portage-2.1.4_rc9 does remove one line of code from vdr-plugin.eclass function. This is the relevant code: cat <<-EOT > "${D}/${DB_FILE}" VDRPLUGIN_DB=1 CREATOR=ECLASS EBUILD=${CATEGORY}/${PN} EBUILD_V=${PVR} EOT The EBUILD= line gets removed so the created file will miss it.
We're currently using grep -v to filter out any variable assignments that cause problems. Filtering of variable assignments is required in order to solve bug 190128, and also to solve bug 56408 (to discard saved variables that can cause interference, such as EBUILD). We can stop using grep and use some more complex parser that recognizes bash's here-documents, but I'm not sure what we're going to use yet. It would be a lot simpler if we didn't have to support here-documents containing variable assignments like that.
I think what I'll probably do is write a python script that behaves very similar to grep -v but also recognizes bash here-documents and allows them to pass through unchanged. The script can be kept in /usr/lib/portage/bin/, like check-implicit-pointer-usage.py is now.
For your info: I did change the code to this to make it work: { echo "VDRPLUGIN_DB=1" echo "CREATOR=ECLASS" echo "EBUILD=${CATEGORY}/${PN}" echo "EBUILD_V=${PVR}" } > "${D}/${DB_FILE}"
(In reply to comment #2) > I think what I'll probably do is write a python script that behaves very > similar to grep -v but also recognizes bash here-documents and allows them to > pass through unchanged. The script can be kept in /usr/lib/portage/bin/, like > check-implicit-pointer-usage.py is now. > Wouldn't it be easier to just detect and ignore bash functions. That does not require detecting different end-of-text markers.
Created attachment 138384 [details, diff] detect bash here-documents and leave them intact (In reply to comment #4) > Wouldn't it be easier to just detect and ignore bash functions. That does not > require detecting different end-of-text markers. I'm not sure what's easier but I've got a working patch that detects here-documents.
Thinking about filter functions, we'd still have to detect here-documents anyway in order to distinguish a } character in a here-document from the end of a function. So, I think our patch is on the right track.
This has been released in 2.1.4_rc10.