diff options
author | Richard Purdie <richard@openedhand.com> | 2007-08-06 14:05:51 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-08-06 14:05:51 +0000 |
commit | 7024f1af86fe0246745913d1b75a86d9095881e7 (patch) | |
tree | 4e1771af22e1baf6d9054fab910332bd8c734828 /meta/classes/package.bbclass | |
parent | 1d612fc0a9943dd2aee909a15153ba7ff1ff0a46 (diff) | |
download | poky-7024f1af86fe0246745913d1b75a86d9095881e7.tar.gz |
package.bbclass: Deal with write protected files correctly
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2374 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 202e594c08..6c25b0d7de 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -141,7 +141,7 @@ def runstrip(file, d): | |||
141 | # A working 'file' (one which works on the target architecture) | 141 | # A working 'file' (one which works on the target architecture) |
142 | # is necessary for this stuff to work, hence the addition to do_package[depends] | 142 | # is necessary for this stuff to work, hence the addition to do_package[depends] |
143 | 143 | ||
144 | import bb, os, commands | 144 | import bb, os, commands, stat |
145 | 145 | ||
146 | pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, 1) | 146 | pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, 1) |
147 | 147 | ||
@@ -159,8 +159,8 @@ def runstrip(file, d): | |||
159 | 159 | ||
160 | newmode = None | 160 | newmode = None |
161 | if not os.access(file, os.W_OK): | 161 | if not os.access(file, os.W_OK): |
162 | origmode = os.stat(file)[os.stat.ST_MODE] | 162 | origmode = os.stat(file)[stat.ST_MODE] |
163 | newmode = origmode | os.stat.S_IWRITE | 163 | newmode = origmode | stat.S_IWRITE |
164 | os.chmod(file, newmode) | 164 | os.chmod(file, newmode) |
165 | 165 | ||
166 | extraflags = "" | 166 | extraflags = "" |