Well, I wanted to regret using #bash for ebuilds, but I guess that's not really ...

@mgorny@treehouse.systems

Well, I wanted to regret using #bash for ebuilds, but I guess that's not really the problem in this case.

#TIL that bash has this default of `shopt -s checkwinsize` that means it automatically sets COLUMNS and ROWS to the terminal size. If you start a new shell, it inherits these variables from the parent, along with the export bit, but as soon as the first external command is executed, it resets the value to the actual terminal size.

So if an ebuild does:

src_test() {
local -x COLUMNS=80
emake check
}

Then each shell started by make(1) will have "COLUMNS=80" exported at first, but as soon as another command is executed, it will magically start exporting a different value. What's really absurd about it, if we didn't export COLUMNS override, these shells won't be exporting the variable in the first place.

This is just batshit insane.

bugs.gentoo.org/984547

Thanks to Serhiy Storchaka for bringing my attention to the problem.

#Gentoo