msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-11 02:41+0100\n"
+"POT-Creation-Date: 2011-12-11 03:33+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 "Extracting"
msgstr ""
-#: ../python/pakfire/builder.py:575
+#: ../python/pakfire/builder.py:582
msgid "You cannot run a build when no package was given."
msgstr ""
-#: ../python/pakfire/builder.py:580
+#: ../python/pakfire/builder.py:587
#, python-format
msgid "Could not find makefile in build root: %s"
msgstr ""
-#: ../python/pakfire/builder.py:594
+#: ../python/pakfire/builder.py:601
msgid "The build command failed. See logfile for details."
msgstr ""
#. Walk through the whole tree and collect all files
#. that are on the same disk (not crossing mountpoints).
-#: ../python/pakfire/builder.py:652
+#: ../python/pakfire/builder.py:659
msgid "Creating filelist..."
msgstr ""
#. Create a nice progressbar.
-#: ../python/pakfire/builder.py:671
+#: ../python/pakfire/builder.py:678
msgid "Compressing files..."
msgstr ""
-#: ../python/pakfire/builder.py:690
+#: ../python/pakfire/builder.py:697
#, python-format
msgid "Cache file was successfully created at %s."
msgstr ""
-#: ../python/pakfire/builder.py:691
+#: ../python/pakfire/builder.py:698
#, python-format
msgid " Containing %(files)s files, it has a size of %(size)s."
msgstr ""
#. Make a nice progress bar as always.
-#: ../python/pakfire/builder.py:702
+#: ../python/pakfire/builder.py:709
msgid "Extracting files..."
msgstr ""
#. Update all packages.
-#: ../python/pakfire/builder.py:722
+#: ../python/pakfire/builder.py:729
msgid "Updating packages from cache..."
msgstr ""
#. Package the result.
#. Make all these little package from the build environment.
-#: ../python/pakfire/builder.py:838
+#: ../python/pakfire/builder.py:845
msgid "Creating packages:"
msgstr ""
#. Execute the buildscript of this stage.
-#: ../python/pakfire/builder.py:858
+#: ../python/pakfire/builder.py:865
#, python-format
msgid "Running stage %s:"
msgstr ""
-#: ../python/pakfire/builder.py:876
+#: ../python/pakfire/builder.py:883
#, python-format
msgid "Could not remove static libraries: %s"
msgstr ""
-#: ../python/pakfire/builder.py:882
+#: ../python/pakfire/builder.py:889
msgid "Compressing man pages did not complete successfully."
msgstr ""
-#: ../python/pakfire/builder.py:902
+#: ../python/pakfire/builder.py:909
msgid "Extracting debuginfo did not complete with success. Aborting build."
msgstr ""
env["ICECC_PREFERRED_HOST"] = \
self.settings.get("icecream_preferred_host")
- # XXX what do we need else?
+ # Fake UTS_MACHINE, when we cannot use the personality syscall and
+ # if the host architecture is not equal to the target architecture.
+ if not self.pakfire.distro.personality and \
+ not self.pakfire.config.host_arch == self.pakfire.distro.arch:
+ env.update({
+ "LD_PRELOAD" : "/usr/lib/libpakfire_preload.so",
+ "UTS_MACHINE" : self.pakfire.distro.arch,
+ })
return env
--- /dev/null
+
+
+#include <stdio.h>
+#include <string.h>
+#include <dlfcn.h>
+#include <stdlib.h> /* for EXIT_FAILURE */
+#include <unistd.h> /* for _exit() */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/syslog.h>
+#include <sys/utsname.h>
+
+#ifndef RTLD_NEXT
+#define RTLD_NEXT ((void *) -1l)
+#endif
+
+typedef int (*uname_t)(struct utsname * buf);
+
+static void *get_libc_func(const char *funcname) {
+ char *error;
+
+ void *func = dlsym(RTLD_NEXT, funcname);
+ if ((error = dlerror()) != NULL) {
+ fprintf(stderr, "I can't locate libc function `%s' error: %s", funcname, error);
+ _exit(EXIT_FAILURE);
+ }
+
+ return func;
+}
+
+int uname(struct utsname *buf) {
+ char *env = NULL;
+
+ /* Call real uname to get the information we need. */
+ uname_t real_uname = (uname_t)get_libc_func("uname");
+ int ret = real_uname((struct utsname *) buf);
+
+ /* Replace release if requested. */
+ if ((env = getenv("UTS_RELEASE")) != NULL) {
+ strncpy(buf->release, env, _UTSNAME_RELEASE_LENGTH);
+ }
+
+ /* Replace machine type if requested. */
+ if ((env = getenv("UTS_MACHINE")) != NULL) {
+ strncpy(buf->machine, env, _UTSNAME_MACHINE_LENGTH);
+ }
+
+ return ret;
+}