GNU bug report logs - #23153
[PATCH]: For FIXME in cp.c

Previous Next

Package: coreutils;

Reported by: Rishabh Dave <rishabhddave <at> gmail.com>

Date: Tue, 29 Mar 2016 21:11:01 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Rishabh Dave <rishabhddave <at> gmail.com>
Subject: bug#23153: closed (Re: bug#23153: [PATCH]: For FIXME in cp.c)
Date: Thu, 03 Nov 2016 00:07:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#23153: [PATCH]: For FIXME in cp.c

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 23153 <at> debbugs.gnu.org.

-- 
23153: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23153
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Rishabh Dave <rishabhddave <at> gmail.com>
Cc: 23153-done <at> debbugs.gnu.org
Subject: Re: bug#23153: [PATCH]: For FIXME in cp.c
Date: Thu, 3 Nov 2016 00:06:41 +0000
[Message part 3 (text/plain, inline)]
Attached are the two patches I intend to push for this
upon the next gnulib update.

Marking this bug as done.

thanks,
Pádraig
[backupfile-cleanup.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Rishabh Dave <rishabhddave <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: [PATCH]: For FIXME in cp.c
Date: Tue, 29 Mar 2016 20:58:01 +0530
[Message part 6 (text/plain, inline)]
Hello,

I have wrote the attached patch for following FIXME in file src/cp.c -

/* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
     we'll actually use backup_suffix_string.  */
  backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");

Since we use backup_suffix_string to duplicate it into
simple_backup_suffix, I brought the getenv() call there, that too, only if
required (as simple_backup_suffix already stores tilde already).


I did 'diff -ur'  directly against original cp.c (named cp-original.c,
then) to create the patch. I tested patch using -b, --backup and --suffix
option of c. Version I have used is latest one on savannah.gnu.org -
coreuitls-8.25.

There was cppi (didn't know what it does) at the bottom of coreutil's
download page. After reading it's README, I concluded that it is not to be
considered while debugging/fixing coreutils. Hopefully, I was correct in
doing so.

If incorrect, please do correct me in any case. :)

There was one little doubt, maybe bug, after doing '--backups=numbered' it
becomes impossible to have suffixed backups (using --suffix or -b) until we
do '--backup=simple' explicitly. Is this supposed to be? I tried with both
altered and unaltered version of cp.
(And should I have or should create/d a new separate thread? I wasn't sure.)
[Message part 7 (text/html, inline)]
[FIXME-calling-getnev.patch (text/x-patch, attachment)]

This bug report was last modified 8 years and 279 days ago.

Previous Next


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