]> git.ipfire.org Git - pakfire.git/commitdiff
Merge branch 'master' of ssh://git.ipfire.org/pub/git/oddments/pakfire
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Oct 2011 10:46:11 +0000 (12:46 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 16 Oct 2011 10:46:11 +0000 (12:46 +0200)
Conflicts:
po/pakfire.pot

po/pakfire.pot
python/pakfire/base.py
python/pakfire/cli.py

index 795812e4466f2b3cd433faeb191b199e65521fc7..7a55bcb92151614161911c67f124d82e49b90b13 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-16 10:39+0000\n"
+"POT-Creation-Date: 2011-10-16 12:45+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -82,11 +82,11 @@ msgstr ""
 msgid "Excluding %s."
 msgstr ""
 
-#: ../python/pakfire/base.py:466
+#: ../python/pakfire/base.py:473
 msgid "Build command has failed."
 msgstr ""
 
-#: ../python/pakfire/base.py:546
+#: ../python/pakfire/base.py:553
 msgid "Everything is fine."
 msgstr ""
 
@@ -271,7 +271,7 @@ msgstr ""
 msgid "You cannot run pakfire-builder in a pakfire chroot."
 msgstr ""
 
-#: ../python/pakfire/cli.py:335 ../python/pakfire/cli.py:590
+#: ../python/pakfire/cli.py:335 ../python/pakfire/cli.py:592
 msgid "Pakfire builder command line interface."
 msgstr ""
 
@@ -279,81 +279,85 @@ msgstr ""
 msgid "Update the package indexes."
 msgstr ""
 
-#: ../python/pakfire/cli.py:396 ../python/pakfire/cli.py:610
+#: ../python/pakfire/cli.py:396 ../python/pakfire/cli.py:612
 msgid "Build one or more packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:398 ../python/pakfire/cli.py:612
+#: ../python/pakfire/cli.py:398 ../python/pakfire/cli.py:614
 msgid "Give name of at least one package to build."
 msgstr ""
 
-#: ../python/pakfire/cli.py:402 ../python/pakfire/cli.py:616
+#: ../python/pakfire/cli.py:402 ../python/pakfire/cli.py:618
 msgid "Build the package for the given architecture."
 msgstr ""
 
-#: ../python/pakfire/cli.py:404 ../python/pakfire/cli.py:430
-#: ../python/pakfire/cli.py:618
+#: ../python/pakfire/cli.py:404 ../python/pakfire/cli.py:432
+#: ../python/pakfire/cli.py:620
 msgid "Path were the output files should be copied to."
 msgstr ""
 
-#: ../python/pakfire/cli.py:406 ../python/pakfire/cli.py:419
-#: ../python/pakfire/cli.py:620
+#: ../python/pakfire/cli.py:406 ../python/pakfire/cli.py:421
+#: ../python/pakfire/cli.py:622
 msgid "Mode to run in. Is either 'release' or 'development' (default)."
 msgstr ""
 
-#: ../python/pakfire/cli.py:411
-msgid "Go into a shell."
+#: ../python/pakfire/cli.py:408
+msgid "Run a shell after a successful build."
 msgstr ""
 
 #: ../python/pakfire/cli.py:413
+msgid "Go into a shell."
+msgstr ""
+
+#: ../python/pakfire/cli.py:415
 msgid "Give name of a package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:417
+#: ../python/pakfire/cli.py:419
 msgid "Emulated architecture in the shell."
 msgstr ""
 
-#: ../python/pakfire/cli.py:424
+#: ../python/pakfire/cli.py:426
 msgid "Generate a source package."
 msgstr ""
 
-#: ../python/pakfire/cli.py:426
+#: ../python/pakfire/cli.py:428
 msgid "Give name(s) of a package(s)."
 msgstr ""
 
-#: ../python/pakfire/cli.py:503
+#: ../python/pakfire/cli.py:505
 msgid "Pakfire server command line interface."
 msgstr ""
 
-#: ../python/pakfire/cli.py:540
+#: ../python/pakfire/cli.py:542
 msgid "Request a build job from the server."
 msgstr ""
 
-#: ../python/pakfire/cli.py:546
+#: ../python/pakfire/cli.py:548
 msgid "Send a keepalive to the server."
 msgstr ""
 
-#: ../python/pakfire/cli.py:553
+#: ../python/pakfire/cli.py:555
 msgid "Update all repositories."
 msgstr ""
 
-#: ../python/pakfire/cli.py:559
+#: ../python/pakfire/cli.py:561
 msgid "Repository management commands."
 msgstr ""
 
-#: ../python/pakfire/cli.py:567
+#: ../python/pakfire/cli.py:569
 msgid "Create a new repository index."
 msgstr ""
 
-#: ../python/pakfire/cli.py:568
+#: ../python/pakfire/cli.py:570
 msgid "Path to the packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:569
+#: ../python/pakfire/cli.py:571
 msgid "Path to input packages."
 msgstr ""
 
-#: ../python/pakfire/cli.py:622
+#: ../python/pakfire/cli.py:624
 msgid "Do not verify build dependencies."
 msgstr ""
 
index 0e67c6832f5470fd1ba7ffe48a4b4bd9aaf09291..fcc51043449db8580a1ea41cef6117437c8da5db 100644 (file)
@@ -423,7 +423,7 @@ class Pakfire(object):
                return sorted(pkgs)
 
        @staticmethod
-       def build(pkg, resultdirs=None, shell=False, install_test=True, **kwargs):
+       def build(pkg, resultdirs=None, shell=False, install_test=True, after_shell=False, **kwargs):
                if not resultdirs:
                        resultdirs = []
 
@@ -438,22 +438,29 @@ class Pakfire(object):
                        # the filesystems and extracting files.
                        b.start()
 
-                       # Build the package.
-                       b.build(install_test=install_test)
+                       try:
+                               # Build the package.
+                               b.build(install_test=install_test)
+                       except BuildError:
+                               # Raise the error, if the user does not want to
+                               # have a shell.
+                               if not shell:
+                                       raise
 
-                       # Copy-out all resultfiles
+                               # Run a shell to debug the issue.
+                               b.shell()
+
+                       # If the user requests a shell after a successful build,
+                       # we run it here.
+                       if after_shell:
+                               b.shell()
+
+                       # Copy-out all resultfiles if the build was successful.
                        for resultdir in resultdirs:
                                if not resultdir:
                                        continue
 
                                b.copy_result(resultdir)
-
-               except BuildError:
-                       if shell:
-                               b.shell()
-                       else:
-                               raise
-
                finally:
                        b.stop()
 
index 492e5ca7f90837e87830e6c32673ced9f565db97..761ade023c74c227eb5065fd4d2aab57d4de5fa8 100644 (file)
@@ -404,6 +404,8 @@ class CliBuilder(Cli):
                        help=_("Path were the output files should be copied to."))
                sub_build.add_argument("-m", "--mode", nargs="?", default="development",
                        help=_("Mode to run in. Is either 'release' or 'development' (default)."))
+               sub_build.add_argument("--after-shell", action="store_true",
+                       help=_("Run a shell after a successful build."))
 
        def parse_command_shell(self):
                # Implement the "shell" command.
@@ -450,7 +452,7 @@ class CliBuilder(Cli):
 
                pakfire.build(pkg, builder_mode=self.args.mode,
                        distro_config=distro_config, resultdirs=[self.args.resultdir,],
-                       shell=True, **self.pakfire_args)
+                       shell=True, after_shell=self.args.after_shell, **self.pakfire_args)
 
        def handle_shell(self):
                pkg = None