msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-16 16:00+0100\n"
+"POT-Creation-Date: 2011-12-23 21:08+0100\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"
msgid "You cannot run pakfire-builder in a pakfire chroot."
msgstr ""
-#: ../python/pakfire/cli.py:379 ../python/pakfire/cli.py:676
+#: ../python/pakfire/cli.py:379 ../python/pakfire/cli.py:688
msgid "Pakfire builder command line interface."
msgstr ""
msgid "Update the package indexes."
msgstr ""
-#: ../python/pakfire/cli.py:443 ../python/pakfire/cli.py:696
+#: ../python/pakfire/cli.py:443 ../python/pakfire/cli.py:708
msgid "Build one or more packages."
msgstr ""
-#: ../python/pakfire/cli.py:445 ../python/pakfire/cli.py:698
+#: ../python/pakfire/cli.py:445 ../python/pakfire/cli.py:710
msgid "Give name of at least one package to build."
msgstr ""
-#: ../python/pakfire/cli.py:449 ../python/pakfire/cli.py:702
+#: ../python/pakfire/cli.py:449 ../python/pakfire/cli.py:714
msgid "Build the package for the given architecture."
msgstr ""
#: ../python/pakfire/cli.py:451 ../python/pakfire/cli.py:479
-#: ../python/pakfire/cli.py:704
+#: ../python/pakfire/cli.py:716
msgid "Path were the output files should be copied to."
msgstr ""
#: ../python/pakfire/cli.py:453 ../python/pakfire/cli.py:468
-#: ../python/pakfire/cli.py:706
+#: ../python/pakfire/cli.py:718
msgid "Mode to run in. Is either 'release' or 'development' (default)."
msgstr ""
msgid "Pakfire server command line interface."
msgstr ""
-#: ../python/pakfire/cli.py:626
+#: ../python/pakfire/cli.py:628
msgid "Request a build job from the server."
msgstr ""
-#: ../python/pakfire/cli.py:632
+#: ../python/pakfire/cli.py:634
msgid "Send a keepalive to the server."
msgstr ""
-#: ../python/pakfire/cli.py:639
+#: ../python/pakfire/cli.py:641
msgid "Update all repositories."
msgstr ""
-#: ../python/pakfire/cli.py:645
+#: ../python/pakfire/cli.py:647
msgid "Repository management commands."
msgstr ""
-#: ../python/pakfire/cli.py:653
+#: ../python/pakfire/cli.py:655
msgid "Create a new repository index."
msgstr ""
-#: ../python/pakfire/cli.py:654
+#: ../python/pakfire/cli.py:656
msgid "Path to the packages."
msgstr ""
-#: ../python/pakfire/cli.py:655
+#: ../python/pakfire/cli.py:657
msgid "Path to input packages."
msgstr ""
-#: ../python/pakfire/cli.py:708
+#: ../python/pakfire/cli.py:662
+msgid "Dump some information about this machine."
+msgstr ""
+
+#: ../python/pakfire/cli.py:720
msgid "Do not verify build dependencies."
msgstr ""
msgstr ""
#. Create progress bar.
-#: ../python/pakfire/repository/index.py:394
+#: ../python/pakfire/repository/index.py:395
#, python-format
msgid "Loading from %s"
msgstr ""
#. Add all packages from the database to the index.
-#: ../python/pakfire/repository/index.py:457
+#: ../python/pakfire/repository/index.py:458
msgid "Loading installed packages"
msgstr ""
msgid " Solutions:"
msgstr ""
+#: ../python/pakfire/server.py:267
+msgid "Could not be determined"
+msgstr ""
+
+#: ../python/pakfire/server.py:291
+msgid "Hostname"
+msgstr ""
+
+#. Hardware information
+#: ../python/pakfire/server.py:295
+msgid "Hardware information"
+msgstr ""
+
+#: ../python/pakfire/server.py:296
+msgid "CPU model"
+msgstr ""
+
+#: ../python/pakfire/server.py:297
+msgid "Memory"
+msgstr ""
+
+#: ../python/pakfire/server.py:299
+msgid "Native arch"
+msgstr ""
+
+#: ../python/pakfire/server.py:301
+msgid "Supported arches"
+msgstr ""
+
#: ../python/pakfire/transaction.py:91
#, python-format
msgid "file %s from %s conflicts with file from package %s"
self.parse_command_keepalive()
self.parse_command_repoupdate()
self.parse_command_repo()
+ self.parse_command_info()
# Finally parse all arguments from the command line and save them.
self.args = self.parser.parse_args()
self.action2func = {
"build" : self.handle_build,
+ "info" : self.handle_info,
"keepalive" : self.handle_keepalive,
"repoupdate" : self.handle_repoupdate,
"repo_create": self.handle_repo_create,
sub_create.add_argument("inputs", nargs="+", help=_("Path to input packages."))
sub_create.add_argument("action", action="store_const", const="repo_create")
+ def parse_command_info(self):
+ sub_info = self.sub_commands.add_parser("info",
+ help=_("Dump some information about this machine."))
+ sub_info.add_argument("action", action="store_const", const="info")
+
def handle_keepalive(self):
self.server.update_info()
pakfire.repo_create(path, self.args.inputs, **self.pakfire_args)
+ def handle_info(self):
+ info = self.server.info()
+
+ print "\n".join(info)
+
class CliBuilderIntern(Cli):
def __init__(self):
"i486" : [ "i486", "i586", "i686", "x86_64", ],
# ARM
- "armv5tel" : [ "armv5tel", "armv5tejl", ],
+ "armv5tel" : [ "armv5tel", "armv5tejl", "armv7l", ],
"armv7hl " : [ "armv7l", ],
}
+ ret = []
for host, can_be_built in host_arches.items():
if self.host_arch in can_be_built:
- yield host
+ ret.append(host)
+
+ ret.sort()
+ return reversed(ret)
def host_supports_arch(self, arch):
"""
import pakfire.util
from pakfire.constants import *
+from pakfire.i18n import _
CHUNK_SIZE = 1024**2 # 1M
"""
return socket.gethostname()
- def update_info(self):
- # Get the current load average.
- loadavg = ", ".join(["%.2f" % l for l in os.getloadavg()])
-
- # Get all supported architectures.
- arches = sorted([a for a in self.config.supported_arches])
- arches = " ".join(arches)
+ @property
+ def uname(self):
+ return os.uname()[4]
+ @property
+ def cpu_model(self):
# Determine CPU model
cpuinfo = {}
with open("/proc/cpuinfo") as f:
cpuinfo[key] = value
- cpu_model = cpuinfo.get("model name", "Could not be determined")
+ ret = None
+ if self.uname.startswith("arm"):
+ try:
+ ret = "%(Hardware)s - %(Processor)s" % cpuinfo
+ except KeyError:
+ pass
+ else:
+ ret = cpuinfo.get("model name", None)
+
+ return ret or _("Could not be determined")
+ @property
+ def memory(self):
# Determine memory size
memory = 0
with open("/proc/meminfo") as f:
except:
pass
else:
- memory = int(b)
+ memory = int(b) * 1024
+
+ return memory
+
+ def info(self):
+ ret = []
+
+ ret.append("")
+ ret.append(" PAKFIRE %s" % PAKFIRE_VERSION)
+ ret.append("")
+ ret.append(" %-20s: %s" % (_("Hostname"), self.hostname))
+ ret.append("")
+
+ # Hardware information
+ ret.append(" %s:" % _("Hardware information"))
+ ret.append(" %-16s: %s" % (_("CPU model"), self.cpu_model))
+ ret.append(" %-16s: %s" % (_("Memory"), pakfire.util.format_size(self.memory)))
+ ret.append("")
+ ret.append(" %-16s: %s" % (_("Native arch"), self.config.host_arch))
+
+ header = _("Supported arches")
+ for arch in self.config.supported_arches:
+ ret.append(" %-16s: %s" % (header, arch))
+ header = ""
+ ret.append("")
+
+ return ret
+
+ def update_info(self):
+ # Get the current load average.
+ loadavg = ", ".join(["%.2f" % l for l in os.getloadavg()])
+
+ # Get all supported architectures.
+ arches = " ".join([a for a in self.config.supported_arches])
- self.conn.update_host_info(loadavg, cpu_model, memory, arches)
+ self.conn.update_host_info(loadavg, self.cpu_model, self.memory, arches)
def upload_file(self, filename, build_id):
# Get the hash of the file.