delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/28/13:23:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com
From: Andrew Schulman <andrex AT alumni DOT utexas DOT net>
Subject: Re: unison doesn't honor HOME when USERPROFILE is set, also permission/uid/gid problems when synchronizing
Date: Tue, 28 Sep 2004 13:23:03 -0400
Lines: 39
Message-ID: <MPG.1bc36800faece93a9896a7@localhost>
References: <87oejqvmsl DOT fsf AT vzell-de DOT de DOT oracle DOT com> <MPG DOT 1bc3442639d8f8549896a6 AT localhost> <87hdpiqpzu DOT fsf AT vzell-de DOT de DOT oracle DOT com>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: pcp04398386pcs.nrockv01.md.comcast.net
User-Agent: MicroPlanet-Gravity/2.70.2067
X-Archive: encrypt
X-IsSubscribed: yes

>     > (1) Unison is looking in $UNISON last.  This is clearly wrong, 
and if 
>     > fixed would allow you to solve your problem by setting 
>     > UNISON=/home/volker/.unison.  But here's something I don't understand:  
>     > on my Cygwin host both UNISON and USERPROFILE are set, but UNISON takes 
>     > precedence. ?? Are you sure this section of code is the operative one 
>     > here?  What happens if you export UNISON=/home/vzell/.unison?
> 
> In that case it will use $UNISON.
> According to the file strings.ml:
> 
>       \032  Unison stores a variety of information in a private directory on each\n\
>       \032  host. If the environment variable UNISON is defined, then its value\n\
>       \032  will be used as the name of this directory. If UNISON is not defined,\n\
>       \032  then the name of the directory depends on which operating system you\n\
>       \032  are using. In Unix, the default is to use $HOME/.unison. In Windows,\n\
>       \032  if the environment variable USERPROFILE is defined, then the directory\n\
>       \032  will be $USERPROFILE\\.unison; otherwise if HOME is defined, it will be\n\
>       \032  $HOME\\.unison; otherwise, it will be c:\\.unison.\n\
>       \032  \n\

Okay, but that's not what the code snippet you cited appears to show:

   match osType with
     `Win32 ->
       let dirString =
         try Unix.getenv "USERPROFILE" (* Windows NT/2K *)
         with Not_found ->
         try Unix.getenv "HOME" (* Windows 9x with Cygwin HOME set *)
         with Not_found ->
         try Unix.getenv "UNISON" (* Use UNISON dir if none of
                                     the above are set *)
         with Not_found -> "c:/" (* Default *) in

I don't know OCaml, but that sure looks to me as though $UNISON is only 
used if $USERPROFILE and $HOME are not set.  And yet that behavior 
doesn't match what I observe on my host.  So that's why I asked, what 
happens if you export UNISON=/home/volker/.unison and rerun?  Does 
unison use $UNISON, or $USERPROFILE/.unison?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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