diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-03 17:29:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:13:00 +0000 |
commit | 1c906e76432fbe9fb1ca9a41e6d309b432222d32 (patch) | |
tree | dd6612a607485cb824ff0850673a33b420076b50 /meta/classes/package.bbclass | |
parent | 48f8eece276ae75dc3fdca02f8c3552042b4a6cc (diff) | |
download | poky-1c906e76432fbe9fb1ca9a41e6d309b432222d32.tar.gz |
package.bbclass: Simplify empty directory removal
Rather than an exec() per directory, we might as well exec one command and
be done with it.
(From OE-Core rev: 82ae9cfb09ee5c0aa6402c972d71e2b64d1ce8bc)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 6ec028b594..a93fef984c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -298,11 +298,7 @@ def copydebugsources(debugsrcdir, d): | |||
298 | subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True) | 298 | subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True) |
299 | 299 | ||
300 | # The copy by cpio may have resulted in some empty directories! Remove these | 300 | # The copy by cpio may have resulted in some empty directories! Remove these |
301 | for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)): | 301 | subprocess.call("find %s%s -empty -type d -delete" % (dvar, debugsrcdir), shell=True) |
302 | for d in dirs: | ||
303 | dir = os.path.join(root, d) | ||
304 | #bb.note("rmdir -p %s" % dir) | ||
305 | subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True) | ||
306 | 302 | ||
307 | # Also remove debugsrcdir if its empty | 303 | # Also remove debugsrcdir if its empty |
308 | for p in nosuchdir[::-1]: | 304 | for p in nosuchdir[::-1]: |