delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/04/05/12:27:02

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:from:subject:reply-to:to:references:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=amZ2czLW1s0PfCjD
x+RuwpoAtAJNUcfKFD/yR1Nvraom5J+M8saOT4QyZ34UcbDvcLqTh/MUFOYnZGYf
urPia0xCqXOdTNU6z2EVEbqgDzY+dz1mcooFs3BlCqhHI6ADuicZmgmjQTgikb1N
UfgLSrrCxcZWU1/M1LXKHOt6pf0=
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:from:subject:reply-to:to:references:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=qIo6J8LumV2al63NBwq9IX
sRk6E=; b=xs41p0+OQTnOLPLfG9ArAvgxAUc393Ou6Y7TDRgXOWt3rYMppfQNtw
gGvMhS1bIJB1ffisAnC+O8LNgNKRffE+Gm9zhXKMUllqjZC7k3IFiC/fAXxiVBZV
xxhz0cirimUpw+7dbclxKt0vwts5nfHMXSGSFQ93ug6WqlyGN3RJs=
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.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:ip*192.168.1.100, Hx-spam-relays-external:!192.168.1.100!, H*RU:!192.168.1.100!, calgary
X-HELO: smtp-out-so.shaw.ca
X-Authority-Analysis: v=2.3 cv=OeS28CbY c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=0yD9ISVwnxQVSN8uV00A:9 a=QEXdDO2ut3YA:10
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Subject: Re: How to handle length limit of PATH environment variable
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
To: cygwin AT cygwin DOT com
References: <ebd804f3-8e24-d96f-7ef4-0e1279afd929 AT gmail DOT com> <08077aa1-2da3-d381-8592-20c39acf063d AT abacus DOT ch>
Message-ID: <fee71278-1680-d1fd-6ffd-e958e6664ba8@SystematicSw.ab.ca>
Date: Thu, 5 Apr 2018 10:26:40 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <08077aa1-2da3-d381-8592-20c39acf063d@abacus.ch>
X-CMAE-Envelope: MS4wfDWub3bVfZ8CAIWfatALpmRMuaD1FubM+4E3utstJaQhtvZZSSz42kSJlnRHNk72nySDX3jEhv/wgaHUampvuW+otMFtkmQqbudkqKkRXV4etniHrkFE 5a45eN9Yb3p19hW9lcR/gZV9HALK/pDXcFP0FeyXYvJmYvI58GvAP01W
X-IsSubscribed: yes

On 2018-04-05 04:05, Wolf Geldmacher wrote:
> On 05.04.2018 11:19, Peter Bauer wrote:
>> i was bitten by the length limit of the PATH variable of 4095 characters (see
>> [1]) and could not find a way around it. This means i have a lot of software
>> packages in different directories and each of them adds itself to the PATH so
>> one can run the executables and have the shared libs available. Under Windows
>> there is the "short path workaround" but what to do under Cygwin?
>> Creating links with shorter names to the directories is not feasible since
>> there may be different users and different directories per user.
>>
>> Any ideas?

> On Unix (though not on cygwin) I've previously solved such issues by writing a
> script that collects symlinks to the contents of some list of directories in a
> few (system and/or user specific) directories. These few directories then take
> the place of the list.
> 
> The script will need to be re-run whenever there are changes to the directories
> on the list, but that can usually be automated.

Under Cygwin, I ln -rs custom local Cygwin scripts and exes in:
	/usr/local/bin/
added at the head of the Cygwin PATH,
and to keep them separate from Cygwin components, put custom local Windows user
scripts and exes in:
	/proc/cygdrive/c/usr/local/bin/
added after all Cygwin dirs in PATH, before other Windows dirs.
I keep Windows system specific scripts e.g. .cmd, .reg and exes requiring
elevation in:
	/proc/cygdrive/c/usr/local/sbin/
separate from the unprivileged components.
I add /usr/local/bin/ to the head of the cron PATH, and /home/.../bin/ to the
tail of the cron PATH, so everything used in cron jobs is there; I run
everything in Scheduled tasks from C:\usr\local\bin\ for similar reasons.

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

- Raw text -


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