[oe] [PATCH 2/2] package.bbclass: preserve modes for non-empty dirs
Michael Smith
msmith at cbnco.com
Sat Jul 11 05:31:07 UTC 2009
Extend commit b1cbbae1 by setting the mode for all dirs, not just
empty dirs.
Signed-off-by: Michael Smith <msmith at cbnco.com>
---
classes/package.bbclass | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/classes/package.bbclass b/classes/package.bbclass
index f6bd7c5..fc12932 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -377,10 +377,14 @@ python populate_packages () {
file = '.' + file
if not os.path.islink(file):
if os.path.isdir(file):
+ bb.mkdirhier(os.path.join(root,file))
+ os.chmod(os.path.join(root,file),
+ os.stat(file).st_mode)
newfiles = [ os.path.join(file,x) for x in os.listdir(file) ]
if newfiles:
files += newfiles
- continue
+ continue
+
globbed = glob.glob(file)
if globbed:
if [ file ] != globbed:
@@ -395,10 +399,6 @@ python populate_packages () {
if file in seen:
continue
seen.append(file)
- if os.path.isdir(file) and not os.path.islink(file):
- bb.mkdirhier(os.path.join(root,file))
- os.chmod(os.path.join(root,file), os.stat(file).st_mode)
- continue
fpath = os.path.join(root,file)
dpath = os.path.dirname(fpath)
bb.mkdirhier(dpath)
--
1.6.3
More information about the Openembedded-devel
mailing list