aboutsummaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-12-08 23:57:05 +0000
committerChris Larson <clarson@kergoth.com>2004-12-08 23:57:05 +0000
commita19eaad79fe677ea72dff32e1f48ddc0c5d9a4c8 (patch)
treea5c7b6a00d357e880bd63c0b9e4c91c4fcb87653 /bin/bitbake
parentde2cced45f5fd4787eda5bef1833e963643a21d9 (diff)
downloadbitbake-a19eaad79fe677ea72dff32e1f48ddc0c5d9a4c8.tar.gz
Rework the way we handle do_clean and do_mrproper so that the .oeclass that defines the task can make it only clean the package and not its dependencies, rather than hardcoding the knowledge in the bitbake command.
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake22
1 files changed, 12 insertions, 10 deletions
diff --git a/bin/bitbake b/bin/bitbake
index 1d4d4096..55d1a670 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -36,8 +36,6 @@ __build_path = []
__preferred = {}
__world_target = Set()
__ignored_dependencies = Set()
-__depcmds = { "clean": None,
- "mrproper": None }
__stats = {}
@@ -109,14 +107,22 @@ def try_build(fn, virtual):
try:
failed = False
- if __depcmd:
+ depcmd = make.options.cmd
+ bbdepcmd = bb.data.getVarFlag('do_%s' % make.options.cmd, 'bbdepcmd', make.pkgdata[fn])
+ if bbdepcmd is not None:
+ if bbdepcmd == "":
+ depcmd = None
+ else:
+ depcmd = bbdepcmd
+
+ if depcmd:
oldcmd = make.options.cmd
- make.options.cmd = __depcmd
+ make.options.cmd = depcmd
for d in depends_list:
if d in __ignored_dependencies:
continue
- if not __depcmd:
+ if not depcmd:
continue
if buildPackage(d) == 0:
bb.error("dependency %s (for %s) not satisfied" % (d,item))
@@ -124,7 +130,7 @@ def try_build(fn, virtual):
if make.options.abort:
break
- if __depcmd:
+ if depcmd:
make.options.cmd = oldcmd
if failed:
@@ -590,10 +596,6 @@ if __name__ == "__main__":
if not make.options.cmd:
make.options.cmd = "build"
- if make.options.cmd in __depcmds:
- __depcmd=__depcmds[make.options.cmd]
- else:
- __depcmd=make.options.cmd
make.pkgdata = {}
make.cfg = bb.data.init()