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

 
 

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

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

Submitted by:  Jaroslav Škarvada <yarda>
Submitted on:  Mon 11 Jul 2011 10:15:28 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Open

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.redhat.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>
Project 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>
Project 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>
Project 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.redhat.com/show_bug.cgi?id=716330

Jaroslav Škarvada <yarda>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 29 Feb 2012 06:03:26 PM UTCeggertStatusNone=>Need Info
    Mon 11 Jul 2011 10:15:28 AM UTCyardaAttached File-=>Added grep-2.9-gnulib-tests-rm-f.patch, #23639
      Carbon-Copy-=>Added yarda

    Back to the top


    Powered by Savane 3.1-cleanup