delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/07/06/08:40:12

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=VriK3j7JSTpNTKOn
eOt3qLZAO64jqGp8hhGFJDkHpmrePnNSucgVxGPNFbM8sGY4WyUbRRPFJw3e/g1U
szTbMJt65Dw9Nn2BuVXBz/xR69OH6o1J+fO9EbwxL+kuuFQyNargACpzX4Pvhku5
A6PaDs+whfmdOjcEi+2JHTuaSy0=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=+8NJEKhm+IW1GwiiFwWNYt
GPcpM=; b=Pynv45nfhDIMT0n0rxbKssQ+mCbnrtMnlP6By1BJdHeuiHWCw3aWVK
FP6F6kgeDMRLaTnjOKtkYzeRqn1X5ig6dtiWYpe0md/80wyWaUCjd8RphlS3N/yn
buWTaJaj/2J1JH8ju1daFFzo1+z9Dj5+rzdHOYxc0qqs8FDZEoFtc=
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=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=discarded, plat, Administrators, AUTHORITY
X-HELO: mail-wm0-f48.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=TJmqeP+refJ6Jv1zM7kWzUnf+vcMnc2X8bglNGm3lBs=; b=IbArQ/XqHVwlnYKB5GyTSlJgh8rvUJ089Ljcob9AUK1OylLlSjJ/q8WfqvorZtKB2U LqQEaDuooqM+gFDq8wR4MgIsLoBXFZ58DUfH4HVWjPXrR58XFIq79+xpSwsqJzEBELzT KOh623CzPewiFXX3Hv3TX/cMhePO/mfv8rDf3pgqIlUNuO6K3cSzxJd7YcEpLTcEc+wQ 3KohbFgDMUijNFFcHuq44DQIMX3m7SKkJ0cw5OiaCsugc86BFYz7k+Zp9nWsIkKKrMc3 LXHd5TBHPNfmZ6mBr+KohsZNR/yyAL+K7peM+czF/VbNH0A8sDQ0BoAP5/NliZp1MrJc oyrg==
X-Gm-Message-State: ALyK8tLdMcGTkj0H9RcICa0KNPBy8H67RRW5SbttJyd8SILVWY8RxA+nlFp8gaUC72+7vw==
X-Received: by 10.194.18.34 with SMTP id t2mr12906098wjd.14.1467808783907; Wed, 06 Jul 2016 05:39:43 -0700 (PDT)
Subject: Re: Anecdotal: Rebase and Visual Studio 2015 and /etc
To: cygwin AT cygwin DOT com
References: <693uFCmXF1392S07 DOT 1467203045 AT web07 DOT cms DOT usa DOT net> <3334CBDB-BF42-4CDA-83B5-CCA5B251A746 AT etr-usa DOT com> <98C319EE-D0EF-48CD-85D7-3384DA5051A9 AT etr-usa DOT com> <44F329F2-C5FE-47D9-BCC5-BF7F9D85F68F AT etr-usa DOT com> <d83f0551-1a48-b723-f50e-9949bd395823 AT cornell DOT edu> <5B19C9A7-3200-4841-A300-D48C600623DA AT etr-usa DOT com>
From: Vlado <v DOT 99cygwin AT gmail DOT com>
Message-ID: <130a4d0b-7691-cf9e-8c33-5ca3bf1c8ad7@gmail.com>
Date: Wed, 6 Jul 2016 14:39:41 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <5B19C9A7-3200-4841-A300-D48C600623DA@etr-usa.com>
X-IsSubscribed: yes

Hi.

One more sugestion: use -e test instead of -r, because Perl -r is not 
allways reliable in mixed Cygwin/Windows environment.

(Cygwin terminal)
$ perl -e "if( -r 
'Cygwin/http%3A%2F%2Fgd.tuwien.ac.at%2Fgnu%2Fcygwin%2F/x86/setup.ini'){print 
'readable'}else{print 'cant read'}"
cant read

$ head 'Cygwin/http%3A%2F%2Fgd.tuwien.ac.at%2Fgnu%2Fcygwin%2F/x86/setup.ini'
# This file is automatically generated.  If you edit it, your
# edits will be discarded next time the file is generated.
# See http://cygwin.com/setup.html for details.
#
release: cygwin
arch: x86
setup-timestamp: 1466876494
setup-version: 2.874

$ getfacl 
'Cygwin/http%3A%2F%2Fgd.tuwien.ac.at%2Fgnu%2Fcygwin%2F/x86/setup.ini'
# file: Cygwin/http%3A%2F%2Fgd.tuwien.ac.at%2Fgnu%2Fcygwin%2F/x86/setup.ini
# owner: POVB+User(1124)
# group: POVB+Group(513)
user::---
group::---
group:SYSTEM:rwx
group:Administrators:rwx
group:VLADOB+Own:rwx
mask:rwx
other:---

$ perl -e "if( -e 
'Cygwin/http%3A%2F%2Fgd.tuwien.ac.at%2Fgnu%2Fcygwin%2F/x86/setup.ini'){print 
'exists'}else{print 'doesnt exists'}"
exists

(Windows Command prompt)
Cygwin\http%3a%2f%2fgd.tuwien.ac.at%2fgnu%2fcygwin%2f> icacls x86\setup.ini
x86\setup.ini NT AUTHORITY\SYSTEM:(I)(F)
               BUILTIN\Administrators:(I)(F)
               VLADOB\Own:(I)(F)

Tail of sub find_setup_ini_file will be:
	open my $uname, '-|', 'uname -m' or die "uname -m failed: $!\n";
	my $plat = <$uname>;
	chomp $plat;
	close $uname;

	my $setup_path = "$path/$mirror/$plat/setup.ini";
	return $setup_path if -e $setup_path;
	
	# If 32-bit Cygwin on 64-bit OS, the above doesn't works
	$setup_path = "$path/$mirror/x86/setup.ini";
	return $setup_path if -e $setup_path;
	
	# Definitely not found
	usage("could not find setup.ini");
}

This works for me.

Vlado

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