diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-22 00:28:28 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-22 00:28:28 +0100 |
commit | 86c2b5670553322e83015df18d53bebbf51e1af5 (patch) | |
tree | c263129bea1346a9259ed5709a2e305db8d40700 | |
parent | ac9e6822f1e83baf6b1430a352adbca9c9185597 (diff) | |
download | poky-86c2b5670553322e83015df18d53bebbf51e1af5.tar.gz |
package.bbclass: If files are unreadable, add read access for stripping
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | meta/classes/package.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 77c2a01967..921071753d 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -192,9 +192,9 @@ def runstrip(file, d): | |||
192 | return os.system("%s'%s' --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates '%s'" % (pathprefix, strip, file)) | 192 | return os.system("%s'%s' --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates '%s'" % (pathprefix, strip, file)) |
193 | 193 | ||
194 | newmode = None | 194 | newmode = None |
195 | if not os.access(file, os.W_OK): | 195 | if not os.access(file, os.W_OK) or os.access(file, os.R_OK): |
196 | origmode = os.stat(file)[stat.ST_MODE] | 196 | origmode = os.stat(file)[stat.ST_MODE] |
197 | newmode = origmode | stat.S_IWRITE | 197 | newmode = origmode | stat.S_IWRITE | stat.S_IREAD |
198 | os.chmod(file, newmode) | 198 | os.chmod(file, newmode) |
199 | 199 | ||
200 | extraflags = "" | 200 | extraflags = "" |