buggrep - Bugs: bug #33747, Use rm -f in gnulib-tests

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33747: Use rm -f in gnulib-tests

Submitter:  Jaroslav Škarvada <yarda>
Submitted:  Mon 11 Jul 2011 10:15:28 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Need Info Privacy:  Public
Assigned to:  None Open/Closed:  Open

Discussion

Fri 02 Mar 2012 08:01:45 PM UTC, comment #5: 

I wouldn't want to change all, necessarily.
Sometimes I omit rm's -f deliberately, because the file
is expected to exist, and if it doesn't I want to see an error.
With -f, that unexpected case would go unreported.

If you find a plausible case in which a conforming rm-without-f
can be made to prompt, that is a bug and we should fix it.
However, using a umask more strict than 077 does not
count as plausible.

If you are using a non-conforming rm, I would encourage
you to adjust it so that it works more like a conforming one.

I read the comments here and in
http://bugzilla ... dhat.com/716330
but did not see a report of any actual malfunction.
Have you seen an actual failure using a "real" rm program?

Jim Meyering <meyering>
Group administrator
Fri 02 Mar 2012 07:33:59 PM UTC, comment #4: 

Hmm, well, perhaps you're right, but don't you need to fix all the 'rm' invocations, not just some of them?  And won't this problem come up with lots of other software, that also uses "rm FOO" to remove the file FOO?

I dunno, I still think you're better off changing your build environment so that "rm FOO" works as expected.  Or, you
could build with "yes | make"....

Paul Eggert <eggert>
Group Member
Fri 02 Mar 2012 03:13:10 PM UTC, comment #3: 

In comment #2 there are not counted these from the proposed patch.

Jaroslav Škarvada <yarda>
Fri 02 Mar 2012 03:10:16 PM UTC, comment #2: 

I tried to grep through grep-2.11 sources and it seems there are only few (hoping that I didn't miss anything):
./configure:rm $cache_file
./configure:rm conftest.$ac_ext
./maint.mk:   rm vc-diffs;
./maint.mk: rm .ci-msg

The vast majority is rm with -f.

Jaroslav Škarvada <yarda>
Wed 29 Feb 2012 06:03:26 PM UTC, comment #1: 

I dunno, there are lots of other places in the grep source code that use 'rm' without '-f'.  Is it really worth our time to go through the code adding '-f' anywhere?  For example, a tester could have an 'rm' that doesn't remove the file at all, but squirrels it away in a subdirectory (I've seen that), and that will break the tests too.  There's no way we can deal with nonstandard rm implementations in general, so shouldn't we just ask testers to supply a rm that conforms to longstanding tradition and to POSIX?

Paul Eggert <eggert>
Group Member
Mon 11 Jul 2011 10:15:28 AM UTC, original submission:  

There are several places in gnulib-tests where rm is used instead of rm -f (as on the most places).

This report originates from:
http://bugzilla.r ... bug.cgi?id=716330

Jaroslav Škarvada <yarda>

 

Attached Files

Attached Files
file #23639:  grep-2.9-gnulib-tests-rm-f.patch added by yarda (2.9KiB - text/x-patch - Proposed fix)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by meyering (Posted a comment)
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by yarda (Submitted the item)
  • -email is unavailable- added by yarda
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-29 eggert StatusNone Need Info
    2011-07-11 yarda Attached File- Added grep-2.9-gnulib-tests-rm-f.patch, #23639
        Carbon-Copy- Added yarda

    Back to the top

    Powered by Savane 3.16-598c.
    Corresponding source code