Mercurial > treepkg
changeset 201:6624e731e218
Add login command to bin/treepkgbuilder.py and corresponding method in
to the PBuilder class
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 20 Aug 2008 13:37:52 +0000 |
parents | ce03e24f6d0f |
children | b1929c11a020 |
files | bin/treepkgbuilder.py treepkg/builder.py |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/treepkgbuilder.py Wed Aug 20 13:30:21 2008 +0000 +++ b/bin/treepkgbuilder.py Wed Aug 20 13:37:52 2008 +0000 @@ -120,6 +120,14 @@ builder.add_apt_key(self.opts.key_id) +class LoginCommand(Command): + + names = ("login",) + + def run(self): + self.get_builder().login() + + class HelpCommand(Command): names = ("help", "--help", "-h")
--- a/treepkg/builder.py Wed Aug 20 13:30:21 2008 +0000 +++ b/treepkg/builder.py Wed Aug 20 13:37:52 2008 +0000 @@ -242,3 +242,10 @@ rootcmd=self.root_cmd, pbuilderrc=self.pbuilderrc, args=args, script=script), suppress_output=False) + + def login(self): + """Start an interactive shell in the pbuilder environment""" + run.call(cmdexpand("@rootcmd /usr/sbin/pbuilder login" + " --configfile $pbuilderrc", + rootcmd=self.root_cmd, pbuilderrc=self.pbuilderrc), + suppress_output=False)