Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: From: "Alan Miles" To: Cc: "cygx" Subject: RE: cygpath hangs from postinstall scripts when called like $(cygpath -S) but not otherwise Date: Fri, 3 Oct 2003 23:19:37 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: <3F7DC08F.3040603@msu.edu> All, I concur - I have a couple of private packages that I build, and then use a local copy of upset to create the setup.ini file. My packages are ** NOT ** XFree86 related, and I have the same type of $(cygpath -S) call in my postinstall scripts. They also freeze up this latest setup.exe, the 2.340.2.5 release of setup.exe everything worked properly. Interesting though, if I run "H:\CygnusSolutions-Cygwin Files\strace.exe" -o "H:\CygnusSolutions-Cygwin Files\strace.setup.txt" "H:\CygnusSolutions-Cygwin Files\setup.exe" from a Windows command short cut, then setup.exe correctly installs cygwin without any freeze ups. Alan -----Original Message----- From: Harold L Hunt II [mailto:huntharo AT msu DOT edu] Sent: October 3, 2003 13:32 To: cygwin-apps AT cygwin DOT com Cc: cygx Subject: Re: cygpath hangs from postinstall scripts when called like $(cygpath -S) but not otherwise I should emphasize that the reason this is important is because the XFree86-bin-icons package calls cygpath in this manner and it freezes setup.exe when the postinstall or preremove script gets run. So, there is current breakage with this. It is not a hypothetical situation. Harold Harold L Hunt II wrote: > This looks like a cygpath problem, but it has something to do with the > environment in which cygpath gets run from a postinstall script. > Whomever is interested, please look into it. Whomever is not > interested, please keep your grumpy flames to yourself. > > > To demonstrate this problem, please do the following > ==================================================== > > 1) Save the attached file as /etc/postinstall/cygpath-hangs.sh. > > 2) Run setup.exe, select any mirror. > > 3) Choose 'keep' on the package selection page. Then, select a null > package (e.g. XFree86-base) and choose 'reinstall'. This will cause > postinstall scripts to be run, but it won't change your installed > package or force you to have to download a large package just to get > this behavior. > > 4) setup.exe will run cygpath-hangs.sh and, lo!, it will sit there (i.e. > hang) waiting for cygpath-hangs.sh to return. > > 5) Go look in /var/log/ for the most recent file following the pattern > setup.log.postinstall*. Open it. > > 6) You should see the following in the log file: > > + which which > /usr/bin/which > + cygpath -S > /cygdrive/c/WINDOWS/system32 > ++ which which > + FOO=/usr/bin/which > ++ cygpath -S > > 7) Run /etc/postinstall/cygpath-hangs.sh from a bash shell and observe > that it does not hang. > > > Summary > ======= > > 1) You can run 'which which' from a postinstall script without saving > its output to a variable. > > 2) You can run 'cygpath -S' (or any other flag combo) from a postinstall > script without saving its output to a variable. > > 3) You can run 'which which' from a postinstall script and save its > output to a variable (e.g. FOO=$(which which)) > > 4) If you run 'cygpath -S' from a postinstall script and save its output > to a variable (e.g. BAR=$(cygpath -S)), then cygpath will fail to return > for eternity. > > 5) cygpath's failure to return causes bash to fail to return, which > causes setup.exe to wait forever for cygpath-hangs.sh to complete. > > > There, I have proven beyond a doubt that this has absolutely nothing to > do with Cygwin/XFree86 :) > > I would appreciate any help in fixing this. > > Thanks in advance, > > Harold > > > ------------------------------------------------------------------------ > > #!/bin/bash -x > > which which > cygpath -S > > FOO=$(which which) > BAR=$(cygpath -S) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/