From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40699 invoked by alias); 20 Dec 2017 23:13:54 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 40691 invoked by uid 89); 20 Dec 2017 23:13:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=calgary, Calgary, alberta, Alberta X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Dec 2017 23:13:52 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with ESMTP id RnYcezFxNZ8gBRnYdeaRKw; Wed, 20 Dec 2017 16:13:51 -0700 X-Authority-Analysis: v=2.2 cv=M/g9E24s c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=N659UExz7-8A:10 a=w_pzkKWiAAAA:8 a=jsVjEt6rpIQ5ml61CgMA:9 a=JpLCNqZxkZnm9G4Q:21 a=pILNOxqGKmIA:10 a=daI9ojH3vpgA:10 a=sRI3_1zDfAgwuvI8zelB:22 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: mkshortcut fails when run from setup, postinstall/cygwin-doc.sh - not otherwise To: cygwin@cygwin.com References: From: Brian Inglis Message-ID: <0bd3dde8-96c2-e007-fb44-96779eb5aff1@SystematicSw.ab.ca> Date: Wed, 20 Dec 2017 23:35:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfH/x0iOP1bINEf1Xy4r9QxVxoRkbxEXrn3vuynvchmDPFSCRgGDjKfdjmAl3wNO7KiaroXu7EkjrqLUYlwQivHDB9RKplT2or7Z+pTSE0GLtSwCdR4/e A1jgkIJrB6Tq9yBRblxHAK0G0JDtSYYR7xONb6QDJqE4nrWXHJukvTW2wHSkC4B8bv2PGb0q7Zp/Zw== X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00236.txt.bz2 On 2017-12-20 05:59, Enrique Perez-Terron wrote: > Lately, whenever I run setup (x86), my /var/log/setup.log.full contains: >  2017/12/20 03:07:44 running: C:\cygwin\bin\bash.exe --norc --noprofile > "/etc/postinstall/cygwin-doc.sh" >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/User Guide (PDF).lnk" failed; does the target directory > exist? >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/User Guide (HTML).lnk" failed; does the target directory > exist? >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/API (PDF).lnk" failed; does the target directory exist? >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/API (HTML).lnk" failed; does the target directory exist? >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/Home Page.lnk" failed; does the target directory exist? >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/FAQ.lnk" failed; does the target directory exist? >  2017/12/20 03:07:45 abnormal exit: exit code=3 > Please notice the extra C:/ in front of the target link name. > So I have added a line "set -x" at the top in  postinstall/cygwin-doc.sh, and > the relevant section becomes >  + read target name desc >  + '[' -r ']' >  + /bin/mkshortcut -A -P -n 'Cygwin/User Guide (PDF)' -d 'Cygwin User Guide PDF' > -- /usr/share/doc/cygwin-doc/cygwin-ug-net.pdf >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/User Guide (PDF).lnk" failed; does the target directory > exist? >  + read target name desc >  + '[' -r ']' >  + /bin/mkshortcut -A -P -n 'Cygwin/User Guide (HTML)' -d 'Cygwin User Guide > HTML' -- /usr/share/doc/cygwin-doc/html/cygwin-ug-net/index.html >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/User Guide (HTML).lnk" failed; does the target directory > exist? >  + read target name desc >  + '[' -r ']' >  + /bin/mkshortcut -A -P -n 'Cygwin/API (PDF)' -d 'Cygwin API Reference PDF' -- > /usr/share/doc/cygwin-doc/cygwin-api.pdf >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/API (PDF).lnk" failed; does the target directory exist? >  + read target name desc >  + '[' -r ']' >  + /bin/mkshortcut -A -P -n 'Cygwin/API (HTML)' -d 'Cygwin API Reference HTML' > -- /usr/share/doc/cygwin-doc/html/cygwin-api/index.html >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/API (HTML).lnk" failed; does the target directory exist? >  + read target name desc >  + read target name desc >  + /bin/mkshortcut -A -P -n 'Cygwin/Home Page' -d 'Cygwin Home Page Link' -a > https://cygwin.com/index.html -- /bin/cygstart >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/Home Page.lnk" failed; does the target directory exist? >  + read target name desc >  + /bin/mkshortcut -A -P -n Cygwin/FAQ -d 'Cygwin Frequently Asked Questions > Link' -a https://cygwin.com/faq.html -- /bin/cygstart >  mkshortcut: Saving "/cygdrive/c/ProgramData/Microsoft/Windows/Start > Menu/Programs/C:/cygwin/FAQ.lnk" failed; does the target directory exist? > (by the way -- this reveals another bug too: The script says "[ -r $t ] && $mks > ..." where I am sure it should be "[ -r $target ] && $mks ...") > (and again btw, I am not sure bash should count "[ -r ]" as a true statement) > The script issues mkshortcut commands with sane arguments, no extra "C:/" in there. > So I just tried to run the script from an elevated-privilege mintty shell: >  $ CYGWINFORALL=-A /bin/bash /etc/postinstall/cygwin-doc.sh > But then it does NOT fail, and the shortcuts do get installed -- they were not > present before. CYGWINFORALL=-A requires elevation or security changes to install for all users. mkshortcut may be defaulting something incorrectly when -A -P is specified without elevation? Patch submitted for variable typo - thanks for catching and reporting. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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