[Treepkg-commits] r126 - in trunk: bin treepkg

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Aug 20 15:37:52 CEST 2008


Author: bh
Date: 2008-08-20 15:37:52 +0200 (Wed, 20 Aug 2008)
New Revision: 126

Modified:
   trunk/bin/treepkgbuilder.py
   trunk/treepkg/builder.py
Log:
Add login command to bin/treepkgbuilder.py and corresponding method in
to the PBuilder class


Modified: trunk/bin/treepkgbuilder.py
===================================================================
--- trunk/bin/treepkgbuilder.py	2008-08-20 13:30:21 UTC (rev 125)
+++ trunk/bin/treepkgbuilder.py	2008-08-20 13:37:52 UTC (rev 126)
@@ -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")

Modified: trunk/treepkg/builder.py
===================================================================
--- trunk/treepkg/builder.py	2008-08-20 13:30:21 UTC (rev 125)
+++ trunk/treepkg/builder.py	2008-08-20 13:37:52 UTC (rev 126)
@@ -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)



More information about the Treepkg-commits mailing list