This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unison doesn't honor HOME when USERPROFILE is set, also permission/uid/gid problems when synchronizing


>>>>> Andrew Schulman writes:

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

    > (2) It seems that Unison treats Cygwin as a Windows OS for this purpose, 
    > so that it looks in $USERPROFILE/.unison before $HOME/.unison.  This is 
    > arguably wrong, but I think I'll have to pose the question on unison-
    > hackers.

    >> --- uicommon.ml.orig    2004-09-28 09:43:28.010992000 +0200
    >> +++ uicommon.ml 2004-09-28 08:41:27.090571200 +0200
    >> @@ -346,7 +346,7 @@
    >> let someHostIsCaseInsensitive =
    >> someHostIsRunningWindows || someHostRunningOsX in
    >> Case.init someHostIsCaseInsensitive;
    >> -  Props.init someHostIsRunningWindows;
    >> +(*  Props.init someHostIsRunningWindows; *)
    >> Osx.init someHostRunningOsX;
    >> return ())

    > And this patch solves the owner and group sync problem?  Sorry but it's 
    > not obvious to me.

I can't remember where it comes from, it's to long ago. I can only say
it does.

    > You say Unison "didn't honor" the owner and group preferences.  What 
    > exactly happened?  Did it just not sync the owners and groups, or did it 
    > give you error messages?

It did not sync the owners and groups, no errors. And for example if you
have two dirs in sync and now create a new file (umask 0022) in one of
them, then chmod 755 it, your version in my case creates the file in the
other dir with 644 permissions. With my patch it works the sync-ed file
also has 755.

    > Thanks for your report.  As soon as I'm sure that I have the right 
    > corrections, I'll release a new version that includes the fixes.

    > Andrew.

Ciao
  Volker


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]