]> code.ossystems Code Review - openembedded-core.git/commit
package.bbclass: remove unneeded chmod() and chown()
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 3 Aug 2016 08:37:53 +0000 (01:37 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Aug 2016 08:36:22 +0000 (09:36 +0100)
commit26ab4b431da0c00010e8d399f890c5fbf0b03c94
tree59eb18550a12f12af01ba1935075eb680b8bba8a
parent88abc4bc9a4e0b4d1e223827fe279b8f008af8a2
package.bbclass: remove unneeded chmod() and chown()

* The mode and owner info are saved in inode, hardlink won't change them,
so remove unneeded chmod() and chown().

* This can avoid the problem that when do_package re-run, the file's mode
maybe different if it is 0444 (changed to 0644 when re-run), this is
caused by pseudo adds 'w' on real file, and doesn't track linked source
when hard link, Peter and Mark may fix pseudo, but the removed code is not
needed, which can avoid the problem.

* To reproduce the problem, for example, version.c from gzip's ${B}:
1) bitbake gzip
2) Edit rpm-native or package.bbclass to make do_package re-run.
3) bitbake gzip
After the first build, build/version.c in gzip-dbg is 0444, but after
the second build, it will be 0644, this because do_package does:
$ ln ${B}/version.c gzip-dbg/version.c,
$ chmod 0444 gzip-dbg/version.c (it runs chmod 0644 on the real filesystem)
And in the second build, the gzip-dbg/version.c will be removed and
created again, so that stat() can't get 0444 but 0644 since
${B}/version.c is not tracked by pseudo.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/package.bbclass