Currently portage autodetects the USERLAND of the current system using os's uname to fill it. That's a non-dependable behaviour and as USERLAND now is set on make.defaults, that code can probably be removed and just use the right USERLAND values. The attached patch does exactly that, using os.environ["USERLAND"] to set up the rest of vars instead of set that environment var using the ostype. HTH, Diego
Created attachment 60228 [details, diff] Patch to remove USERLAND autodetection.
why not make it fall back to autodetection if USERLAND is set to "" or unset
Have you actually tested this patch? os.environ["USERLAND"] will usually raise a KeyError for not being defined. The profile stuff never gets into portage's environment. It's read in through an instance of the config class that gets defined in portage.py *after* portage_data has already been imported.
Ok I think I messed up the files when I tested this (just found out that there was a .rej with the whole patch in the portage/pym directory of the g/fbsd box where I (though of having) tested that, so I just tested that the original portage worked. Sorry about that, I'll work on a working patch asap.
Might want to leave this for HEAD. That will have to wait until configuration stuff is sorted out though...
Scratching this for now, the CHOST expansion will take care.