problems with xfree

Jehan nahor@bravobrava.com
Fri Jul 26 00:27:00 GMT 2002


Harold L Hunt II wrote:
> Christopher Faylor wrote:
> 
>> On Thu, Jul 25, 2002 at 04:47:39PM -0400, Harold L Hunt II wrote:
>>
>>> Let me see if I understand what is going on here:
>>>
>>> We are debeating whether to:
>>>
>>> 1) Modify /etc/profile, which is not installed via a package, but is 
>>> created directly by setup.exe.
>>>
>>> 2) Add two scripts, one for bash-style shells and one for 
>>> c-shell-style shells to /etc/profile.d/.  These scripts are processed 
>>> by /etc/profile.  We would add this new scripts to an XFree86 
>>> package, probably XFree86-bin, and we would install these scripts via 
>>> a post-install script if they were not already present (so we do not 
>>> overwrite modifications).
>>>
>>> Of all the arguments for/against the two methods, so far only one 
>>> seems to be a sticking point that essentially decides how we will do 
>>> this:
>>>
>>> There is no guarantee that the sub-script in /etc/profile.d/ that 
>>> adds /usr/X11R6/bin to the path will be executed before some other 
>>> shell script, that may be added at a later date to /etc/profile.d/, 
>>> that requires that the path to the X11R6 binaries already be set.  In 
>>> order to allow other scripts in /etc/profile.d/ to assume that the 
>>> path to the X11R6 binaries is known, we must set the path to the 
>>> binaries in /etc/profile before the /etc/profile.d/ scripts are 
>>> processed.
>>
>>
>>
>> I don't know what this "other" script in /etc/profile.d might be, but
>> if it is a problem for the "other" script, it could easily include
>> /etc/profile.d/add_x11_path (or whatever) to add the script to ensure
>> that the path was properly set.
>>
>> So, I think that adding an appropriate file to /etc/profile.d makes
>> more sense.  Then people who don't have /usr/bin/X11R6 don't have
>> a spurious check for the directory in their /etc/profile.
>>
>> cgf
> 
> 
> That sounds even more reasonable.  No one has suggested that yet.
> 
> One question though... are there any known packages that put a script in 
> /etc/profile.d/ that expect the path to the X11R6 binaries to already be 
> set, but that do not include some X11R6 path-setting script?  We would 
> have to modify any such scripts, if we ever encounter them, to include 
> our X11R6 path-setting script.  That doesn't seem like a horrible 
> trade-off.
> 
> Okay, go with the new scripts in /etc/profile.d/.
> 
> Jehan - you sent in these scripts before, right?  Could you send them 
> again?  Thanks.

Here they are.
I renamed them 00xfree.* as suggested by Max Bowsher which I thing is 
even cleaner than having other scripts including the XFree script (which 
would mean that the script will have to keep its name whatever happens, 
it would be executed several times, ...).

 From the bash man page:
	Pathname Expansion
		After  word  splitting, unless the -f option has been
		set, bash scans each word for the characters *, ?, and
		[. If one of these characters appears, then the word is
		regarded as a pattern, and replaced with an
		alphabetically sorted  list  of  file  names  matching
		the pattern.

 From the tcsh man page:
	Filename substitution
		If a word contains any of the characters `*', `?', `['
		or `{' or begins with the character `~' it is  a
		candidate  for  filename substitution, also known as
		``globbing''.  This word is then regarded as a pattern
		(``glob-pattern''), and replaced with an alphabetically
		sorted list of file names which match the pattern

So I think we could use this feature to ensure that the XFree script 
will be executed before any other scripts.


	Jehan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 00xfree.csh
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20020726/4879e18a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 00xfree.sh
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20020726/4879e18a/attachment-0001.ksh>


More information about the Cygwin-xfree mailing list