bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15819: colorls.csh errors out if "noclobber" is set (coreutils 8.21.


From: Ty! Boyack
Subject: bug#15819: colorls.csh errors out if "noclobber" is set (coreutils 8.21.11, Fedora19)
Date: Wed, 06 Nov 2013 10:46:21 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

Thanks everyone, sorry to have filed it in the wrong place initially. You all are an incredibly responsive group - and it's greatly appreciated!

Cheers,

-Ty!

On 11/06/2013 06:30 AM, Ondrej Vasik wrote:
On Wed, 2013-11-06 at 14:09 +0100, Bernhard Voelker wrote:
tag 15819 notabug
thanks

[added Ondrej]

On November 6, 2013 at 8:00 AM Ty! Boyack<address@hidden>  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
The file 'colorls.csh' is not part of the upstream project
but rather an Fedora extension.  I'm therefore marking this bug
as 'done'.

It seems this particular issue has been fixed for F20 only:
http://pkgs.fedoraproject.org/cgit/coreutils.git/commit/?id=f0b6f85aff0496c51c8fcb58197a8a132949a4e5

@Ondrej: do you plan to merge this to F19?
It was fixed only partially, direct redirection in the part mentioned by
Ty! still existed even in the rawhide trees.
We don't do update for such minor issues in released Fedoras, but it
will be included in next cumulative F19 coreutils update, where I
usually merge all fixes from Fedora Rawhide from time to time.

Greetings,
           Ondrej


--
-===========================-
  Ty Boyack
  NREL Senior IT Engineer
  address@hidden
  (970) 491-1186
-===========================-






reply via email to

[Prev in Thread] Current Thread [Next in Thread]