emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#15819: closed (colorls.csh errors out if "noclobbe


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15819: closed (colorls.csh errors out if "noclobber" is set (coreutils 8.21.11, Fedora19))
Date: Wed, 06 Nov 2013 13:10:02 +0000

Your message dated Wed, 6 Nov 2013 14:09:13 +0100 (CET)
with message-id <address@hidden>
and subject line Re: bug#15819: colorls.csh errors out if "noclobber" is set 
(coreutils 8.21.11, Fedora19)
has caused the debbugs.gnu.org bug report #15819,
regarding colorls.csh errors out if "noclobber" is set (coreutils 8.21.11, 
Fedora19)
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15819: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15819
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: colorls.csh errors out if "noclobber" is set (coreutils 8.21.11, Fedora19) Date: Wed, 06 Nov 2013 00:00:12 -0700 User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
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.

Cheers to all,

-Ty!



--- End Message ---
--- Begin Message --- Subject: Re: bug#15819: colorls.csh errors out if "noclobber" is set (coreutils 8.21.11, Fedora19) Date: Wed, 6 Nov 2013 14:09:13 +0100 (CET)
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?

Have a nice day,
Berny


--- End Message ---

reply via email to

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