Bug 42414 - Run path_helper in OSX postinstall script to make Mono commands available in same shell session
Summary: Run path_helper in OSX postinstall script to make Mono commands available in ...
Alias: None
Product: Runtime
Classification: Mono
Component: packaging ()
Version: 4.4.0 (C7)
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.8.0 (C9)
Assignee: Alexis Christoforides
Depends on:
Reported: 2016-07-07 23:06 UTC by Alexander Köplinger [MSFT]
Modified: 2017-03-03 21:34 UTC (History)
5 users (show)

Is this bug a regression?: Yes
Last known good build: 4.4.0

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alexander Köplinger [MSFT] 2016-07-07 23:06:57 UTC
We discussed this yesterday on Slack, but I since found out that we'll not only hit this on Travis but in the product builds that do Mono autoprovisioning too, so I thought it's better to have it tracked.

>so I found a pretty interesting "regression" with the mono 4.4.1 osx package due to https://github.com/xamarin/bockbuild/commit/4bf7d2ee28d5fd1c6c9c4cb0231f0cef8a8ac859
>the issue is that adding stuff to /etc/paths.d doesn't cause the current PATH to be updated. since we  are installing Mono on >travis by fetching the .pkg and installing it in the same shell session, the commands weren't found
>this wasn't an issue before when the symlinks were installed to /usr/local/bin, since that is in the path by default
>the fix I applied was to run `eval $(/usr/libexec/path_helper -s)` to refresh the PATH, which worked
Comment 1 Luis Aguilera 2016-09-12 20:14:42 UTC
since C8 is now closed, and is shipping this week, I will move this but to the C8SR1 milestone. We'll continue working on the issue seeking it's resolution as soon as possible.
Comment 2 Alexis Christoforides 2016-09-23 19:40:08 UTC
The attempted fix does not work (running the command from inside the package's post-install script). A proper fix seems to have to involve updating shell startup scripts, which has to be done carefully and may not have a simple solution.

I will likely take care of the bash and zsh possibilities, but please feel free to suggest any other methods you may have or shells that are affected.
Comment 3 Alexis Christoforides 2016-12-19 15:24:28 UTC
Fixed in mono/bockbuild master and xamarin/bockbuild mono-4.8.0-branch (for bash and zsh)