* [PATCH] build.py: Preserve sigdata files in the stamps directory
@ 2012-11-28 20:26 Richard Purdie
2012-11-28 22:19 ` Chris Larson
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2012-11-28 20:26 UTC (permalink / raw)
To: bitbake-devel; +Cc: Eggleton, Paul
Leaving the sigdata files around can aid debugging and doesn't harm
anything. This is the easiest way to allow this to happen.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 8ff7fb2..f9f0a65 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] build.py: Preserve sigdata files in the stamps directory
2012-11-28 20:26 [PATCH] build.py: Preserve sigdata files in the stamps directory Richard Purdie
@ 2012-11-28 22:19 ` Chris Larson
2012-11-28 22:19 ` Chris Larson
0 siblings, 1 reply; 4+ messages in thread
From: Chris Larson @ 2012-11-28 22:19 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel, Eggleton, Paul
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
On Wed, Nov 28, 2012 at 1:26 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> - 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:
--
Christopher Larson
[-- Attachment #2: Type: text/html, Size: 692 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build.py: Preserve sigdata files in the stamps directory
2012-11-28 22:19 ` Chris Larson
@ 2012-11-28 22:19 ` Chris Larson
2012-11-29 12:21 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Chris Larson @ 2012-11-28 22:19 UTC (permalink / raw)
To: Richard Purdie; +Cc: bitbake-devel, Eggleton, Paul
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
On Wed, Nov 28, 2012 at 3:19 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Wed, Nov 28, 2012 at 1:26 PM, Richard Purdie <
> richard.purdie@linuxfoundation.org> wrote:
>
>> - 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.
--
Christopher Larson
[-- Attachment #2: Type: text/html, Size: 1163 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build.py: Preserve sigdata files in the stamps directory
2012-11-28 22:19 ` Chris Larson
@ 2012-11-29 12:21 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2012-11-29 12:21 UTC (permalink / raw)
To: Chris Larson; +Cc: bitbake-devel, Eggleton, Paul
On Wed, 2012-11-28 at 15:19 -0700, Chris Larson wrote:
> On Wed, Nov 28, 2012 at 3:19 PM, Chris Larson <clarson@kergoth.com>
> wrote:
> On Wed, Nov 28, 2012 at 1:26 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> - 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.
Yes, good point, thanks.
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-29 13:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 20:26 [PATCH] build.py: Preserve sigdata files in the stamps directory Richard Purdie
2012-11-28 22:19 ` Chris Larson
2012-11-28 22:19 ` Chris Larson
2012-11-29 12:21 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.