Bug 1027279 - colorls.csh errors out if "noclobber" is set
colorls.csh errors out if "noclobber" is set
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 08:15 EST by Pádraig Brady
Modified: 2016-01-04 09:41 EST (History)
7 users (show)

See Also:
Fixed In Version: coreutils-8.21-21.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-04 22:33:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pádraig Brady 2013-11-06 08:15:15 EST
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 08:21:04 EST
I should have said the above is all on behalf of Ty Boyack <ty.boyack@colostate.edu> from: http://bugs.gnu.org/15819
Comment 2 Ondrej Vasik 2013-11-06 08:39:47 EST
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 05:42:42 EST
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 00:53:11 EST
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-04 22:33:43 EST
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 09:25:28 EST
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 01:34:45 EST
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.