delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/12/20/08:00:18

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:message-id; q=
dns; s=default; b=VoNh5i/I5To5ZuvK38a+32oEyrWT8soFm/8esa6v3M+a9j
tHojXo9MqhVczrihG+kMxK22oxFZPpOJ+ed4Zo78PU8JQ+K2aubKSy8zzDjN23vt
lhJdVACyIOcBc4BIEVEbU87U1nwdBFvm0xdIgFoPa/Rieat3J9rLeL+uM7ESk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:content-type
:content-transfer-encoding:date:from:to:subject:message-id; s=
default; bh=bnq81qCX945Rjfqess5OQmt+AXU=; b=s4vn30JgeZ+xvZ3CTVVA
w6SSWyOOED8XWtafu4Khz+tlqNNdR4KzwAp0nFrmxQ9wqJ9s7R3K7bRgFeOjLM5/
9a79GzjFdFwg0n1x2Oh5Apkp2ANkepNvi46tY38g5M8Uxt7PaVs9mBXUxtT64ZZQ
75ba6wHF4QP0hU4xQHCGIbU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Page, 1709, Menu, setuplogfull
X-HELO: fox.rettoggalt.com
MIME-Version: 1.0
Date: Wed, 20 Dec 2017 13:59:55 +0100
From: Enrique Perez-Terron <enrique AT perezterron DOT net>
To: cygwin AT cygwin DOT com
Subject: mkshortcut fails when run from setup, postinstall/cygwin-doc.sh - not otherwise
Message-ID: <ea0e60e8cd4b773198d4ef8f863cdd1e@perezterron.net>
X-Sender: enrique AT perezterron DOT net

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.


I am still running the 32-bit cygwin, though on a 64-bit windows 10 Home 
edition, version 1709, OS build 16299.125.

Any ideas about what could be the problem?

-Enrique

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019