mintty postinstall failure - attn: cygutils maintainer
Wed Oct 6 18:44:00 GMT 2010
On 6 October 2010 15:39, Eric Blake wrote:
> On 10/06/2010 06:28 AM, Andy Koppe wrote:
>> On 6 October 2010 12:54, Eric Blake wrote:
>>> Any reason why with my setup, mintty.sh exits with status 3 when run by
>>> setup.exe, but with status 0 when I run it by hand?
>>> doesn't give any hints; what else can I try to debug the issue?
>> Assuming you were installing for All Users, try setting
>> CYGWINFORALL=-A when running it by hand.
> Hmm, no I wasn't remembering to do that; but even when I add that in, I'm
> still getting status 0 by hand:
> $ CYGWINFORALL=-A sh -vx /etc/postinstall/mintty.sh
> + ALL=-A
> PROGS=$(/bin/cygpath -P $ALL)
> /bin/cygpath -P $ALL
> ++ /bin/cygpath -P -A
> + PROGS='/cygdrive/c/Documents and Settings/All Users/Start Menu/Programs'
> /bin/mkdir -p "$PROGS/Cygwin" &&
> /bin/mkshortcut -P $ALL -n Cygwin/mintty -a - -d Terminal /bin/mintty &&
> if [ "$ALL" ]; then
> /bin/chmod a+r "$PROGS/Cygwin/mintty.lnk"
> + /bin/mkdir -p '/cygdrive/c/Documents and Settings/All Users/Start
> + /bin/mkshortcut -P -A -n Cygwin/mintty -a - -d Terminal /bin/mintty
> + '[' -A ']'
> + /bin/chmod a+r '/cygdrive/c/Documents and Settings/All Users/Start
> But this time, I looked in /var/log/setup.log.full, and got this hint:
> 2010/10/06 08:25:18 running: k:\cygwin-2\bin\bash.exe --norc --noprofile
> mkshortcut: Saving "C:\Documents and Settings\All Users\Start
> Menu\Programs\K:\cygwin-2\Cygwin\mintty.lnk" failed; does the target
> directory exist?
> 2010/10/06 08:25:18 abnormal exit: exit code=3
> Hmm - this looks like it could be a bug in mkshortcut. Why is the '-n
> Cygwin/mintty' argument showing up as an absolute pathname appended to the
> tail of the start menu prefix? Is it a bug that is dependent on the current
> working directory?
I can't see anything obviously wrong with mkshortcut. It converts the
link name with cygwin_conv_to_win32_path(), adds '.lnk', and prepends
the start menu path.
cygwin_conv_to_win32_path() is supposed to turn a relative POSIX path
such as 'Cygwin/mintty' into a relative Window path. That appears to
work fine most of the time, at least I haven't seen this issue in my
tests. Can anyone think of a reason why it might turn it into an
absolute path such as 'K:\cygwin-2\Cygwin\mintty.lnk' instead?
Does it make a difference if you run the script from the root
directory of the install (which I think is where setup.exe runs then
from) or from a cmd shell?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin