Merged from trunk -r14018:14028
| 14019 | Create portage._merge_encoding and a corresponding _os_merge |
| zmedico | wrapper that will later be used for all the merge code. |
| 14020 | Use portage's selinux wrapper module for mkdir calls. |
| zmedico | |
| 14021 | Make _ensure_default_encoding() provide a fallback for the |
| zmedico | codec returned by sys.getfilesystemencoding(). |
| 14022 | Replace the selinux.spawn() function with a spawn_wrapper() |
| zmedico | function and use it inside portage._spawn_fetch() and |
| | portage.spawn(). |
| 14023 | Don't use the unicode-wrapped os and shutil modules here |
| zmedico | since the whole _selinux module itself will be wrapped. |
| 14024 | Add an 'encoding' parameter to movefile(), so that we can |
| zmedico | make it obey sys.getfilesystemencoding() when called for |
| | merge/unmerge. |
| 14025 | Make sure portage.selinux and _selinux exist, even when |
| zmedico | import fails, so that 'from portage import selinux' never |
| | fails inside vartree.py. |
| 14026 | Don't 'del sys.modules["selinux"]' when selinux support |
| zmedico | isn't enabled in the portage config, because that just |
| | assumes too much. |
| 14027 | Use portage._merge_encoding to encode/decode all filenames |
| zmedico | during merge/unmerge operations. |
| 14028 | _merge_encoding = sys.getfilesystemencoding() |
| zmedico | |
svn path=/main/branches/prefix/; revision=14046