Hi,
attached is a patch for the DPKG-packaging that fixes a bug when
locale is set to something with non-English output.
- Werner
diff -ruN cfengine-2.2.5-old/src/package.c
cfengine-2.2.5/src/package.c
--- cfengine-2.2.5-old/src/package.c 2008-03-21 08:50:17.000000000 +0100
+++ cfengine-2.2.5/src/package.c 2008-03-26 23:19:01.000000000 +0100
@@ -998,8 +998,8 @@
Verbose ("Package: %s\n",package);
/* check that the package exists in the package database */
-snprintf (VBUFF, CF_BUFSIZE, "/usr/bin/apt-cache policy %s 2>&1 | grep -v " \
- "\"W: Unable to locate package \"", package);
+snprintf (VBUFF, CF_BUFSIZE, "LANG=C /usr/bin/apt-cache policy %s 2>&1 | " \
+ "grep -v \"W: Unable to locate package \"", package);
if ((pp = cfpopen_sh(VBUFF, "r")) == NULL)
{
@@ -1020,7 +1020,7 @@
}
/* check what version is installed on the system (if any) */
-snprintf (VBUFF, CF_BUFSIZE, "/usr/bin/apt-cache policy %s", package);
+snprintf (VBUFF, CF_BUFSIZE, "LANG=C /usr/bin/apt-cache policy %s", package);
/*
* HvB: cfopen to cfopen_sh, fix bug for packages without version
number
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine