Bug 1027279 - colorls.csh errors out if "noclobber" is set
Summary: colorls.csh errors out if "noclobber" is set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-06 13:15 UTC by Pádraig Brady
Modified: 2016-01-04 14:41 UTC (History)
7 users (show)

Fixed In Version: coreutils-8.21-21.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 03:33:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pádraig Brady 2013-11-06 13:15:15 UTC
Version: coreutils 8.21.11

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

Comment 1 Pádraig Brady 2013-11-06 13:21:04 UTC
I should have said the above is all on behalf of Ty Boyack <ty.boyack> from: http://bugs.gnu.org/15819

Comment 2 Ondrej Vasik 2013-11-06 13:39:47 UTC
Rawhide commit https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20131104/1140247.html ... 
I'll keep it opened until fixed in next cumulative update for F19.

Comment 3 Fedora Update System 2014-01-20 10:42:42 UTC
coreutils-8.21-13.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/coreutils-8.21-13.fc19

Comment 4 Fedora Update System 2014-01-21 05:53:11 UTC
Package coreutils-8.21-13.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing coreutils-8.21-13.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1208/coreutils-8.21-13.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-02-05 03:33:43 UTC
coreutils-8.21-13.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-03-05 14:25:28 UTC
coreutils-8.21-21.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/coreutils-8.21-21.fc20

Comment 7 Fedora Update System 2014-03-07 06:34:45 UTC
coreutils-8.21-21.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.