[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#645553: packagekit: FTBFS on hurd-i386



Package: packagekit
Version: 0.6.18-1
Severity: important
User: debian-hurd@lists.debian.org
Usertags: hurd

Hello,

packagekit currently FTBFS on hurd-i386 due to inconditional PATH_MAX
use. The attached patch fixes it by using glibc's getcwd allocation
behavior, could you please apply it? packagekit currently prevents
gnome3 build.

Samuel

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.4 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

-- 
Samuel Thibault <samuel.thibault@fnac.net>
<s> on se croirait en cool : Some browsers close comments on the first ">" character, so to hide script content from such browsers, you can transpose operands for relational and shift operators (e.g., use "y < x" rather than "x > y") or use scripting language-dependent escapes for ">".
 -+- #ens-mim -+-
--- ./lib/packagekit-glib2/pk-service-pack.c.orig	2011-10-16 22:08:13.000000000 +0000
+++ ./lib/packagekit-glib2/pk-service-pack.c	2011-10-16 22:09:33.000000000 +0000
@@ -212,10 +212,16 @@
 	int r;
 	int retval;
 	gchar *retcwd;
+
+#ifdef __GLIBC__
+	/* save the PWD as we chdir to extract */
+	gchar *buf = getcwd (NULL, 0);
+#else
 	gchar buf[PATH_MAX];
 
 	/* save the PWD as we chdir to extract */
 	retcwd = getcwd (buf, PATH_MAX);
+#endif
 	if (retcwd == NULL) {
 		g_set_error_literal (error, PK_SERVICE_PACK_ERROR, PK_SERVICE_PACK_ERROR_FAILED_SETUP,
 				      "failed to get cwd");
@@ -273,6 +279,9 @@
 	retval = chdir (buf);
 	if (retval != 0)
 		g_warning ("cannot chdir back!");
+#ifdef __GLIBC__
+	free(buf);
+#endif
 
 	return ret;
 }

Reply to: