bugGNU patch - Bugs: bug #39603, patch-2.7.1 doesn't remove temp...

 
 

bug #39603: patch-2.7.1 doesn't remove temp dirs if the wrong patch level is specified

Submitted by:  Joshua Kinard <kumba>
Submitted on:  Mon 29 Jul 2013 08:51:37 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 30 Jul 2013 11:04:33 AM UTC, comment #1:

This doesn't really have to do with the fact that patch startet to create temporary output and reject files in the directory that the output or reject file would eventually end up in (in order to give the file the appropriate permissions under permission inheritance). It was doing the same thing under --dry-run but didn't remove directories leading to the temporary output file.

Commit afdfa9ec from just now changes that to only create temporary files in the final output directory when not in --dry-run mode.

Andreas Gruenbacher <agruen>
Project Administrator
Mon 29 Jul 2013 08:51:37 AM UTC, original submission:

Per this git commit:
http://git.savannah.gnu.org/cgit/patch.git/commit/?id=2f40ef66bea54be23a24f616cde021d8d7fc25be

And this bug report on the ML:
https://lists.gnu.org/archive/html/bug-patch/2013-03/msg00000.html

Patch wasn't cleaning up after itself. It appears that after the commit above, patch cleans up if the patch level is correct, but not if the wrong patch level is specified.

Easy testcase:

1. Download linux-3.10.0 off of kernel.org.
2. Download latest 3.10.x patch (as of writing, 3.10.4).
3. Uncompress both to working temp dir.
4. cd into the linux dir, and apply patch like so:
patch -p0 --no-backup-if-mismatch --dry-run -f < ../patch-3.10.x
5. Because Linux patches are diffed a/* against b/*, using -p0 will fail to apply. However, there will be a leftover "b/" dir in the kernel source tree because patch did not clean up its tmp dirs properly.

Joshua Kinard <kumba>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by agruen (Posted a comment)
  • -unavailable- added by kumba (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 30 Jul 2013 11:04:33 AM UTCagruenStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1