Re: Patch for DPKG-packaging

Mark Burgess <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.bugs
Message-ID <[email protected]>
Applied

Morten Werner Forsbring wrote:
> 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

-- 


Mark Burgess

Web: http://www.iu.hio.no/~mark
Tlf: +47 22453272
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.