# XXX perform build
- def shell(self, install=[]):
+ def shell(self, install=None):
if not util.cli_is_interactive():
self.log.warning("Cannot run shell on non-interactive console.")
return
+ # Collect packages to install
+ packages = []
+
# Install our standard shell packages
- self._install(SHELL_PACKAGES + install)
+ packages += SHELL_PACKAGES
+
+ # Install any packages the user requested
+ if install:
+ packages += install
+
+ self._install(packages)
command = "/usr/sbin/chroot %s %s %s" % (self.chrootPath(), SHELL_SCRIPT)
# shell
shell = subparsers.add_parser("shell", help=_("Go into a build shell"))
shell.add_argument("package", nargs="?", help=_("Give name of a package"))
+ shell.add_argument("--install", nargs="*",
+ help=_("Packages that should be installed in the shell"))
shell.set_defaults(func=self.handle_shell)
shell.add_argument("-m", "--mode", nargs="?", default="development",
def handle_shell(self, ns):
with self.builder(ns) as b:
- b.shell()
+ b.shell(install=ns.install)
def handle_dist(self, ns):
# Get the packages from the command line options