delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_YG,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <4DF50E8C.3060600@cornell.edu> |
References: | <4DF4FDAC DOT 8010809 AT web DOT de> <4DF50E8C DOT 3060600 AT cornell DOT edu> |
Date: | Sun, 12 Jun 2011 20:19:28 +0100 |
Message-ID: | <BANLkTik2OyQGe9rPEyome750x+CyHrpNQg@mail.gmail.com> |
Subject: | Re: TMP and TEMP get redefined, but I need the original values |
From: | Andy Koppe <andy DOT koppe AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id p5CJJsgK018366 |
On 12 June 2011 20:07, Ken Brown wrote: > On 6/12/2011 1:55 PM, Roland Bluethgen wrote: >> >> Hey folks! >> >> I don't update my Cygwin installation regularly, but recently I did, and >> then a script of mine stopped working. >> >> Looking for the cause I found out that the Cygwin maintainers chose to >> redefine the TEMP and TMP environment variables in /etc/profile like this: >> >> unset TMP TEMP >> TMP="/tmp" >> TEMP="/tmp" >> >> http://cygwin.com/ml/cygwin/2011-03/msg00211.html >> >> Before that change, the TMP and TEMP defined by Windows were used >> unmodified (except for cygpath translation). I'm sure the maintainers >> have good reasons for this change. However, now I'm unable to find out >> the original TEMP setting from a script. >> >> To help your imagination what this could be good for, the purpose of the >> script in question is for aiding in Windows maintenance, specifically >> for cleaning up the TEMP folder. >> >> I helped myself by deactivating the lines cited above in /etc/profile >> for now, but that is clearly not a fine solution. Well, I could store >> the original values of TMP and TEMP in backup variables, like >> WINDOWS_TEMP or so. That would have to go in /etc/profile before the >> variables are unset. But then, this modification would probably get >> overwritten the next time something is changed in that file on the >> distribution side. > > No, it wouldn't get overwritten. Â Your /etc/profile will only get > overwritten if it's unchanged from the default. That can be a problem in itself though, if you do want to benefit from any updates. Therefore I think that the TMP/TEMP setting should go into /etc/profile.d/temp.sh or some such, so that it can be removed or modified without touching /etc/profile. Saving the original values seems a good idea too. (The reason for overriding TMP/TEMP is that having them point at the default Windows temp directory causes odd permissions to be picked up from that directory in some operations. IIRC, 'patch' was the motivating example.) Andy -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |