packaged-staging.bbclass: use 'os.unlink()' instead of spawning 'rm'
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Tue, 13 Apr 2010 23:55:39 +0000 (23:55 +0000)
committerTom Rini <tom_rini@mentor.com>
Wed, 14 Apr 2010 20:37:58 +0000 (13:37 -0700)
commit69c718c98ccb2e794a1c07e8354a79c255ff94fa
tree29956479e00582255f9383e3909a5c78a93f7f97
parent83bdc2c30fe8004adb958ca3f112608435f0cf42
packaged-staging.bbclass: use 'os.unlink()' instead of spawning 'rm'

Doing a '-c clean' operation on a staged package with very much files
(e.g. glibc) took several minutes because

* every removed file was reported
* an 'rm' instance was spawned for every file

This patch uses the native 'os.unlink()' method for removing files and
reports only the removed root directory instead of the single files.

Based upon maillist discussion, reporting happens with 'debug' level
instead of 'note' one, and only error conditions due to non-existing
files will be ignored.  Other (e.g. permission denied) errors will now
abort the build while they were silently ignored previously.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Acked-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Acked-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/packaged-staging.bbclass