delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/16/15:47:31

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F3D6B36.3080500@lysator.liu.se>
Date: Thu, 16 Feb 2012 21:46:46 +0100
From: Peter Rosin <peda AT lysator DOT liu DOT se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: base-files 4.0-9: LANG is set to the system default, why not the user selection?
References: <4F3BBA41 DOT 6050800 AT lysator DOT liu DOT se> <CAHWeT-YdkjH1dRwS+GuTmzoP7QO2P1w1Jr_tBNkj3224P--axQ AT mail DOT gmail DOT com> <20120215221458 DOT GA6842 AT jethro DOT local DOT lan> <4F3C99B2 DOT 9000507 AT lysator DOT liu DOT se> <4F3CD659 DOT 7070109 AT lysator DOT liu DOT se> <4F3CE52C DOT 70409 AT gmail DOT com> <4F3CFEB0 DOT 3040307 AT lysator DOT liu DOT se> <4F3D06A9 DOT 5000602 AT gmail DOT com> <4F3D11AF DOT 4090005 AT lysator DOT liu DOT se> <20120216200538 DOT GA9451 AT jethro DOT local DOT lan>
In-Reply-To: <20120216200538.GA9451@jethro.local.lan>
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

David Sastre Medina skrev 2012-02-16 21:05:
> No need. It looks like I haven't properly understood your complain. Also it
> looks like I haven't explain properly what was the thing with setting
> 'locale' both system-wide and user-defined.
> 
> For the first, I apologize. WRT the second, here's a new attempt:
> 'locale' is set system-wide in /etc/profile.d/tzset.* to provide
> a new functionality, that, IIRC, was included in the announcement of
> the base-files' release.
> Also, 'locale' _can_ be set at a user-defined level, to provide the
> user the ability to set 'locale' despite system-wide setting, wich
> could be needed in multi-user environments, for instance.

(or as in my case, where someone else decided that I should have a non-
English version of Windows.)

> base-files includes several files that create you $HOME and populate
> it with the files under /etc/skel/. After that, if you ever modify
> them, further updates won't affect those files, respecting the policy
> of not dealing with user modified files (some other distros will
> prompt you to either install the package version, keep the installed
> version or see the differences, for example).
> 
> The scripts that check for existing files, compare them to the package
> version and perform the update if it has to be done are:
> 
> /etc/preremove/base-files.sh
> /etc/postinstall/base-files.sh
> 
> Your attached .bash_profile does look unmodified, BTW, so regarding
> the fact it wasn't replaced by the update process, I've tried to
> reproduce it, unsuccessfully. It works for me.

As I understand it, base-files contains the file
/etc/defaults/etc/skel/.bash_profile.
At installation, /etc/postinstall/base-files.sh copies that to
/etc/skel/.bash_profile, if it that file doesn't exist already.
Then at uninstall, if /etc/preremove/base-files.sh finds that
/etc/skel/.bash_profile is not changed, it is removed (so that
an updated package feels free to copy over the new version).

Further, when a user *first* logs in, /etc/skel/.bash_profile
is copied to ~/.bash_profile by the /etc/profile script.  At no
other point are files in ~ modified, as I understand it.  The
way I read your explanation above, you are implying that your
~/.bash_profile is updated along with /etc/skel/.bash_profile,
and I simply fail to see where that is happening.  It is also
counter to the message from /etc/profile (also quoted by Mike):

  Copying skeleton files.
  These files are for the users to personalise their cygwin experience.

  They will never be overwritten nor automatically updated.

I.e. my /etc/skel/.bash_profile is version 4.0-9 as I expect,
but my ~/.bash_profile is the old 4.0-6 version from when I
first logged in, and I see no code anywhere that checks if
~/.bash_profile matches /etc/skel/.bash_profile and updates
if it is pristine.  So, the question remains, why is your
~/.bash_profile updated when you upgrade the base-files package?

Or have I misinterpreted your message again?

.bash_profile is of course just an example in this, select any
of .bash_profile, .inputrc, .bashrc and .profile.

Cheers,
Peter

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