250 | | |
251 | | == Hanging commands on Mountain Lion == #mtln-hangs |
252 | | |
253 | | '''Symptom''' |
254 | | |
255 | | Running MacPorts 2.1.3 or older under a root login shell on Mountain |
256 | | Lion may hang indefinitely; this is due to |
257 | | [http://developer.apple.com/library/mac/#releasenotes/CoreFoundation/CoreFoundation.html certain changes in CoreFoundation]. |
258 | | A workaround has been [[changeset:104118|committed to trunk]] and is |
259 | | available as of the release of MacPorts 2.2.0. |
260 | | |
261 | | '''Workaround''' |
262 | | |
263 | | The recommended way to avoid this issue is to avoid running MacPorts in |
264 | | root login shells. Non-login root shells are fine. |
265 | | ||= =||= DO =||= DON’T =|| |
266 | | ||= Non-interactive =|| `sudo port …`\\`su -c port …` || `su - -c port …` || |
267 | | ||= Interactive =|| `sudo -s`\\`su`\\`login -l root` || `sudo -i`\\`sudo su -`\\`sudo su -l`\\`su -`\\`su -l`\\`login root` || |
268 | | |
269 | | If you absolutely must use a root login shell, you can |
270 | | 1. update your MacPorts installation to version 2.2.0 with `sudo port selfupdate`, or |
271 | | 1. [[howto/RunningTrunk|run MacPorts from trunk]], or |
272 | | 2. work around the problem by setting !__CFPREFERENCES_AVOID_DAEMON to “1” in the environment and configuring MacPorts to preserve it in macports.conf: |
273 | | {{{ |
274 | | extra_env __CFPREFERENCES_AVOID_DAEMON |
275 | | }}} |
276 | | Note that using `extra_env` is unsupported. |