GNU bug report logs - #15819
colorls.csh errors out if "noclobber" is set (coreutils 8.21.11, Fedora19)

Previous Next

Package: coreutils;

Reported by: "Ty! Boyack" <ty.boyack <at> colostate.edu>

Date: Wed, 6 Nov 2013 07:22:01 UTC

Severity: normal

Tags: notabug

Done: Bernhard Voelker <mail <at> bernhard-voelker.de>

Bug is archived. No further changes may be made.

Full log


Message #15 received at control <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: "Ty! Boyack" <ty.boyack <at> colostate.edu>
Cc: 15819 <at> debbugs.gnu.org
Subject: Re: bug#15819: colorls.csh errors out if "noclobber" is set (coreutils
 8.21.11, Fedora19)
Date: Wed, 06 Nov 2013 13:21:46 +0000
tag 15819 notabug
close 15819
stop

On 11/06/2013 07:00 AM, Ty! Boyack wrote:
> Behavior:
> 
> The setup script /etc/profile.d/colorls.csh works fine in a stock F19
> installation, but if a local admin adds a default shell setting of
> "noclobber" in a profile setting that runs before this script (as we do)
> then the script will error out with an error of:
> 
> /tmp/.colorlsXXX: File exists.
> 
> Cause:
> 
> The script creates that temporary file with mktemp, but on the first
> write it uses only a single redirect (>), which fails when noclobber is set.
> 
> Since the file is already created, I think we can safely use an append
> redirect (>>) in all cases where that file is written to, which works
> regardless of the state of the noclobber settting.
> 
> Patch:
> 
> 35c35
> < if ( "$INCLUDE" != '' ) cat "$INCLUDE" > $TMP
> ---
>> if ( "$INCLUDE" != '' ) cat "$INCLUDE" >> $TMP
> 
> Disclaimer:
> 
> I know this is not against the latest source, but I did not see anything
> in the bug lists regarding this.  My apologies if this has already been
> looked at and fixed or dismissed.

"Include" support was added to the _Fedora_ ls color config files recently,
which broke things in various situations. Since this is not a upstream
issue, I'm closing it here and opened: https://bugzilla.redhat.com/1027279

thanks,
Pádraig.





This bug report was last modified 11 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.