packages += bootloader.packages
# Install them
- self.install_packages(packages)
+ if packages:
+ self.install_packages(packages, title=_("Installing Bootloader"))
# Install all bootloaders
for bootloader in self.bricklayer.bootloaders:
###############################################################################
from . import step
+from .i18n import _
class InstallPackages(step.Step):
def run(self):
# Get list of all packages to be installed
packages = self.bricklayer.settings.get("packages", [])
- self.install_packages(packages)
+ try:
+ title = _("Installing %(PRETTY_NAME)s") % self.bricklayer.os
+ except KeyError:
+ title = _("Installing Base System")
+
+ self.install_packages(packages, title=title)
"""
pass
- def install_packages(self, packages):
+ def install_packages(self, packages, title=None):
# Nothing to do if there are no packages
if not packages:
return
+ # Set a useful title if none is set
+ if not title:
+ title = _("Installing Packages")
+
# Set up Pakfire
- with self.tui.progress(
- _("Installing Packages"),
- _("Installing packages..."),
- max_value=100,
- ) as t:
+ with self.tui.progress(title, _("Installing packages..."), max_value=100) as t:
# Create a new Pakfire instance
p = self.bricklayer.setup_pakfire(**t.callbacks)