This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mintty postinstall failure - attn: cygutils maintainer


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?
>>> /var/log/setup.log.full
>>> 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=$CYGWINFORALL
> + 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"
> fi
> + /bin/mkdir -p '/cygdrive/c/Documents and Settings/All Users/Start
> Menu/Programs/Cygwin'
> + /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
> Menu/Programs/Cygwin/mintty.lnk'
>
> 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
> /etc/postinstall/mintty.sh
> 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?

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]