]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: If files are unreadable, add read access for stripping
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 21 Aug 2010 23:28:28 +0000 (00:28 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 21 Aug 2010 23:28:28 +0000 (00:28 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/package.bbclass

index 77c2a01967ecb995b8de9edcdc2c866a1d33d631..921071753d7517341de7f4033416f18f2c545f3c 100644 (file)
@@ -192,9 +192,9 @@ def runstrip(file, d):
         return os.system("%s'%s' --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates '%s'" % (pathprefix, strip, file))
 
     newmode = None
-    if not os.access(file, os.W_OK):
+    if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
         origmode = os.stat(file)[stat.ST_MODE]
-        newmode = origmode | stat.S_IWRITE
+        newmode = origmode | stat.S_IWRITE | stat.S_IREAD
         os.chmod(file, newmode)
 
     extraflags = ""