diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-23 19:42:04 +0100 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-23 19:42:04 +0100 |
| commit | 255f45be57b2209f81ee513ebc43ce7f808c2f2b (patch) | |
| tree | 10ffb4df6bb4129a45c81101b08a57171feff6f9 | |
| parent | e912493614c8e19b2b9a668e172d8ad6ea4d0091 (diff) | |
| download | poky-255f45be57b2209f81ee513ebc43ce7f808c2f2b.tar.gz | |
bitbake-dev: Improve showEnvironment functionality
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
| -rw-r--r-- | bitbake-dev/lib/bb/command.py | 15 | ||||
| -rw-r--r-- | bitbake-dev/lib/bb/cooker.py | 4 |
2 files changed, 15 insertions, 4 deletions
diff --git a/bitbake-dev/lib/bb/command.py b/bitbake-dev/lib/bb/command.py index 8667736fa1..4cab78e43b 100644 --- a/bitbake-dev/lib/bb/command.py +++ b/bitbake-dev/lib/bb/command.py | |||
| @@ -203,16 +203,25 @@ class CommandsAsync: | |||
| 203 | command.finishAsyncCommand() | 203 | command.finishAsyncCommand() |
| 204 | showVersions.needcache = True | 204 | showVersions.needcache = True |
| 205 | 205 | ||
| 206 | def showEnvironment(self, command, params): | 206 | def showEnvironmentPackage(self, command, params): |
| 207 | """ | 207 | """ |
| 208 | Print the environment | 208 | Print the environment of a recipe |
| 209 | """ | 209 | """ |
| 210 | bfile = params[0] | 210 | bfile = params[0] |
| 211 | pkg = params[1] | 211 | pkg = params[1] |
| 212 | 212 | ||
| 213 | command.cooker.showEnvironment(bfile, pkg) | 213 | command.cooker.showEnvironment(bfile, pkg) |
| 214 | command.finishAsyncCommand() | 214 | command.finishAsyncCommand() |
| 215 | showEnvironment.needcache = True | 215 | showEnvironmentPackage.needcache = True |
| 216 | |||
| 217 | def showEnvironment(self, command, params): | ||
| 218 | """ | ||
| 219 | Print the standard environment | ||
| 220 | """ | ||
| 221 | |||
| 222 | command.cooker.showEnvironment() | ||
| 223 | command.finishAsyncCommand() | ||
| 224 | showEnvironment.needcache = False | ||
| 216 | 225 | ||
| 217 | def parseFiles(self, command, params): | 226 | def parseFiles(self, command, params): |
| 218 | """ | 227 | """ |
diff --git a/bitbake-dev/lib/bb/cooker.py b/bitbake-dev/lib/bb/cooker.py index 3c232a6ac7..dceebb12d5 100644 --- a/bitbake-dev/lib/bb/cooker.py +++ b/bitbake-dev/lib/bb/cooker.py | |||
| @@ -141,8 +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: | ||
| 145 | self.commandlineAction = ["showEnvironmentPackage", self.configuration.buildfile, self.configuration.pkgs_to_build] | ||
| 144 | else: | 146 | else: |
| 145 | self.commandlineAction = ["showEnvironment", self.configuration.buildfile, self.configuration.pkgs_to_build] | 147 | self.commandlineAction = ["showEnvironment"] |
| 146 | elif self.configuration.buildfile is not None: | 148 | elif self.configuration.buildfile is not None: |
| 147 | self.commandlineAction = ["buildFile", self.configuration.buildfile, self.configuration.cmd] | 149 | self.commandlineAction = ["buildFile", self.configuration.buildfile, self.configuration.cmd] |
| 148 | elif self.configuration.show_versions: | 150 | elif self.configuration.show_versions: |
