souzaonofre / fabricate

Automatically exported from code.google.com/p/fabricate
0 stars 0 forks source link

Test for ignore(name) missing in AtimesRunner? #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run attached script

What is the expected output? What do you see instead?

Case 1: If neither foo nor .deps exists when the script is run, then fabricate 
creates a .deps file in which "touch foo" has no dependencies.

Case 2: If foo exists but .deps does not when the script is run, then fabricate 
creates a .deps file in which "touch foo" depends on foo as an output.

I expected the .deps file in Case 2 to be the same as in Case 1.

What version of the product are you using? On what operating system?

fabricate 1.22
Python 2.6.5
Ubuntu 10.04, kernel 2.6.32-34-generic

Please provide any additional information below.

I believe this happens because a test for ignore(name) is missing. 
Specifically, lines 420-421 of fabricate.py are

if afters[name][1]-mtime_resolution/2 > befores[name][1]:
    outputs.append(name)

but I believe they should instead be

if afters[name][1]-mtime_resolution/2 > befores[name][1]:
    if not self.ignore(name):
        outputs.append(name)

Original issue reported on code.google.com by ThomasBe...@gmail.com on 13 Oct 2011 at 8:44

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report. I hope to have a look at this in the next few days.

Original comment by benh...@gmail.com on 29 Oct 2011 at 6:40

GoogleCodeExporter commented 9 years ago
I've confirmed this, tested it, and fixed it as suggested in r150. Thanks for 
the clear bug report and concise repro!

Original comment by benh...@gmail.com on 9 Nov 2011 at 2:26