Yocto 1561: enable cleanup of WORKDIR
cover Yocto 1561: enable cleanup of WORKDIR
Hi Saul,
This is implementation of Yocto 1561: enable cleanup of WORKDIR. The original design was create a new script to fullfill the feature, but it doesn't work. So I add a command line option to do it.
Regards,
The following changes since commit 6b6aa170d5c618cfcd016dd1de926db647f7f932:
busybox: Restore 'date' compatability (2012-03-01 23:16:43 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/cleanup
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/cleanup
Kang Kai (1):
bitbake: enable cleanup of WORKDIR
bitbake/bin/bitbake | 4 +++ bitbake/lib/bb/command.py | 5 +++ bitbake/lib/bb/cooker.py | 63 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/1 bitbake: enable cleanup of WORKDIR
[Yocto 1561]
Add a command line option for bitbake to enable cleanup of WORKDIR. It checks every package build directories under WORKDIR then parse the directory name to get package name and version. If the version is not the package prefer version then delete the directory.
--- bitbake/bin/bitbake | 4 +++ bitbake/lib/bb/command.py | 5 +++ bitbake/lib/bb/cooker.py | 63 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 0 deletions(-)
bitbake/bin/bitbake +4 -0
@@ -170,6 +170,10 @@ Default BBFILES are the .bb files in the current directory.""") parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to", action = "store", dest = "bind", default = False) + + parser.add_option("-C", "--clean-workdir", help = "Clean up the old version build directories in workdir", + action = "store_true", dest = "clean_workdir", default = False) + options, args = parser.parse_args(sys.argv) configuration = BBConfiguration(options)
bitbake/lib/bb/command.py +5 -0
@@ -294,6 +294,11 @@ class CommandsAsync: command.finishAsyncCommand() findConfigFilePath.needcache = False + def cleanupWorkdir(self, command, params): + command.cooker.cleanupWorkdir() + command.finishAsyncCommand() + cleanupWorkdir.needcache = True + def showVersions(self, command, params): """ Show the currently selected versions
bitbake/lib/bb/cooker.py +63 -0
81 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Re: [PATCH 1/1] bitbake: enable cleanup of WORKDIR
Quoted 6 lines · Kang Kai
[Yocto 1561]
Add a command line option for bitbake to enable cleanup of WORKDIR. It checks every package build directories under WORKDIR then parse the directory name to get package name and version. If the version is not the package prefer version then delete the directory.
Quoted 6 lines
Signed-off-by Kang Kai <[email protected]>---
bitbake/bin/bitbake | 4 +++
bitbake/lib/bb/command.py | 5 +++
bitbake/lib/bb/cooker.py | 63 +++++++++++++++++++++++++++++++++++++++++++++3 files changed, 72 insertions(+), 0 deletions(-)
This is wrong on multiple levels. bitbake (other than some hacky stuff in the fetcher that needs to die) has *zero* knowledge of the use of WORKDIR today, that's entirely metadata implementation.
Signature · 1 line
Christopher Larson
Re: [PATCH 1/1] bitbake: enable cleanup of WORKDIR
Quoted 14 lines · Chris Larson
Quoted 6 lines · Kang Kai
[Yocto 1561]
Add a command line option for bitbake to enable cleanup of WORKDIR. It checks every package build directories under WORKDIR then parse the directory name to get package name and version. If the version is not the package prefer version then delete the directory.Quoted 6 lines
Signed-off-by Kang Kai <[email protected]>--- bitbake/bin/bitbake | 4 +++ bitbake/lib/bb/command.py | 5 +++ bitbake/lib/bb/cooker.py | 63 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 0 deletions(-)
Quoted 3 lines
This is wrong on multiple levels. bitbake (other than some hacky stuff in the fetcher that needs to die) has *zero* knowledge of the use of WORKDIR today, that's entirely metadata implementation.
Totally agreed. I saw a comment earlier today in the bugzilla about this and made the same comment even before I saw this patch...
Cheers,
Richard
Re: [PATCH 1/1] bitbake: enable cleanup of WORKDIR
Quoted 14 lines · Richard Purdie
Quoted 13 lines · Chris Larson
Quoted 12 lines · Kang Kai
[Yocto 1561]
Add a command line option for bitbake to enable cleanup of WORKDIR. It checks every package build directories under WORKDIR then parse the directory name to get package name and version. If the version is not the package prefer version then delete the directory.Signed-off-by Kang Kai<[email protected]>--- bitbake/bin/bitbake | 4 +++ bitbake/lib/bb/command.py | 5 +++ bitbake/lib/bb/cooker.py | 63 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 0 deletions(-)
Quoted 5 lines
Quoted 3 lines
This is wrong on multiple levels. bitbake (other than some hacky stuff in the fetcher that needs to die) has *zero* knowledge of the use of WORKDIR today, that's entirely metadata implementation.
Totally agreed. I saw a comment earlier today in the bugzilla about this and made the same comment even before I saw this patch...
OK. I'll do it in another way.
Regards,
Kai
Quoted 5 lines
Cheers,
Richard