diff options
Diffstat (limited to 'bitbake-dev')
-rw-r--r-- | bitbake-dev/lib/bb/command.py | 16 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/cooker.py | 6 |
2 files changed, 12 insertions, 10 deletions
diff --git a/bitbake-dev/lib/bb/command.py b/bitbake-dev/lib/bb/command.py index 4cab78e43b..9226a2772f 100644 --- a/bitbake-dev/lib/bb/command.py +++ b/bitbake-dev/lib/bb/command.py | |||
@@ -203,23 +203,25 @@ class CommandsAsync: | |||
203 | command.finishAsyncCommand() | 203 | command.finishAsyncCommand() |
204 | showVersions.needcache = True | 204 | showVersions.needcache = True |
205 | 205 | ||
206 | def showEnvironmentPackage(self, command, params): | 206 | def showEnvironmentTarget(self, command, params): |
207 | """ | 207 | """ |
208 | Print the environment of a recipe | 208 | Print the environment of a target recipe |
209 | (needs the cache to work out which recipe to use) | ||
209 | """ | 210 | """ |
210 | bfile = params[0] | 211 | pkg = params[0] |
211 | pkg = params[1] | ||
212 | 212 | ||
213 | command.cooker.showEnvironment(bfile, pkg) | 213 | command.cooker.showEnvironment(None, pkg) |
214 | command.finishAsyncCommand() | 214 | command.finishAsyncCommand() |
215 | showEnvironmentPackage.needcache = True | 215 | showEnvironmentTarget.needcache = True |
216 | 216 | ||
217 | def showEnvironment(self, command, params): | 217 | def showEnvironment(self, command, params): |
218 | """ | 218 | """ |
219 | Print the standard environment | 219 | Print the standard environment |
220 | or if specified the environment for a specified recipe | ||
220 | """ | 221 | """ |
222 | bfile = params[0] | ||
221 | 223 | ||
222 | command.cooker.showEnvironment() | 224 | command.cooker.showEnvironment(bfile) |
223 | command.finishAsyncCommand() | 225 | command.finishAsyncCommand() |
224 | showEnvironment.needcache = False | 226 | showEnvironment.needcache = False |
225 | 227 | ||
diff --git a/bitbake-dev/lib/bb/cooker.py b/bitbake-dev/lib/bb/cooker.py index dceebb12d5..bec6c3535c 100644 --- a/bitbake-dev/lib/bb/cooker.py +++ b/bitbake-dev/lib/bb/cooker.py | |||
@@ -141,10 +141,10 @@ class BBCooker: | |||
141 | bb.error("Only one target can be used with the --environment option.") | 141 | bb.error("Only one target can be used with the --environment option.") |
142 | elif self.configuration.buildfile and len(self.configuration.pkgs_to_build) > 0: | 142 | elif self.configuration.buildfile and len(self.configuration.pkgs_to_build) > 0: |
143 | bb.error("No target should be used with the --environment and --buildfile options.") | 143 | bb.error("No target should be used with the --environment and --buildfile options.") |
144 | elif self.configuration.buildfile is not None or len(self.configuration.pkgs_to_build) > 0: | 144 | elif len(self.configuration.pkgs_to_build) > 0: |
145 | self.commandlineAction = ["showEnvironmentPackage", self.configuration.buildfile, self.configuration.pkgs_to_build] | 145 | self.commandlineAction = ["showEnvironmentTarget", self.configuration.pkgs_to_build] |
146 | else: | 146 | else: |
147 | self.commandlineAction = ["showEnvironment"] | 147 | self.commandlineAction = ["showEnvironment", self.configuration.buildfile] |
148 | elif self.configuration.buildfile is not None: | 148 | elif self.configuration.buildfile is not None: |
149 | self.commandlineAction = ["buildFile", self.configuration.buildfile, self.configuration.cmd] | 149 | self.commandlineAction = ["buildFile", self.configuration.buildfile, self.configuration.cmd] |
150 | elif self.configuration.show_versions: | 150 | elif self.configuration.show_versions: |