build.py: Preserve sigdata files in the stamps directory
PATCH 1/1 build.py: Preserve sigdata files in the stamps directory
Leaving the sigdata files around can aid debugging and doesn't harm anything. This is the easiest way to allow this to happen.
---
bitbake/lib/bb/build.py +7 -2
@@ -29,6 +29,7 @@ import os import sys import logging import shlex +import glob import bb import bb.msg import bb.process
@@ -504,8 +505,12 @@ def make_stamp(task, d, file_name = None): """ cleanmask = stamp_cleanmask_internal(task, d, file_name) for mask in cleanmask: - bb.utils.remove(mask) - + # Preserve sigdata files in the stamps directory + for name in glob.glob(mask): + if name.find("sigdata") != -1: + continue + os.unlink(name) + stamp = stamp_internal(task, d, file_name) # Remove the file and recreate to force timestamp # change on broken NFS filesystems
bitbake/lib/bb/build.py def make_stamp(task, d, file_name = None): · line 510
Quoted 6 lines · Richard Purdie
bitbake/lib/bb/build.py +3
-2- bb.utils.remove(mask) - + # Preserve sigdata files in the stamps directory + for name in glob.glob(mask): + if name.find("sigdata") != -1:
if 'sigdata' not in name:
Signature · 1 line
Christopher Larson
Quoted 11 lines · Chris Larson
bitbake/lib/bb/build.py def make_stamp(task, d, file_name = None): · line 510
Quoted 6 lines · Richard Purdie
bitbake/lib/bb/build.py +3
-2- bb.utils.remove(mask) - + # Preserve sigdata files in the stamps directory + for name in glob.glob(mask): + if name.find("sigdata") != -1:if 'sigdata' not in name:
Erm, s/not in/in/. You get the idea. Use of 'find' only really makes sense if you need the locations within the string.
Signature · 1 line
Christopher Larson
Quoted 11 lines · Chris Larson
On Wed, Nov 28, 2012 at 3:19 PM, Chris Larson <[email protected]> wrote:
On Wed, Nov 28, 2012 at 1:26 PM, Richard Purdie <[email protected]> wrote:
-bb.utils.remove(mask)
-
+ # Preserve sigdata files in the stamps
directory
+ for name inglob.glob(mask):
+ ifname.find("sigdata")!= -1:
Quoted 4 lines
if 'sigdata' not in name:
Erm, s/not in/in/. You get the idea. Use of 'find' only really makes sense if you need the locations within the string.
Yes, good point, thanks.
Richard