cfengine2: package command fails to identify package state

Bill Thorsteinson bill at systemajik.com
Sat Jun 7 03:47:22 UTC 2008


Package: cfengine2
Version: 2.2.3-1
Severity: important
Tags: patch


Debug output from cfengine failure is as follows:
cfpopen(LANG=C /usr/bin/apt-cache policy resolvconf)
cfpclose(pp)
cfpopen - Waiting for process 7960
Something impossible happened... ('grep' exited abnormally).

Problem is traced to a Debian specific patch which added LANG=C to
command.  As configure LANG=C fails to run. The missing part of the
Debian patch is also attached.

Workaround is provide a LANG=C command to run $* in the path.  Example
shell program is attached.

*** package.c.patch
--- package.c.broken	2008-06-06 23:10:37.000000000 -0400
+++ package.c	2008-06-06 23:09:44.000000000 -0400
@@ -769,7 +769,7 @@
 /* check what version is installed on the system (if any) */
 snprintf (VBUFF, CF_BUFSIZE, "LANG=C /usr/bin/apt-cache policy %s", package);
 
-if ((pp = cfpopen (VBUFF, "r")) == NULL)
+if ((pp = cfpopen_sh (VBUFF, "r")) == NULL)
    {
    Verbose ("Could not execute APT-command (apt-cache policy).\n");
    return 0;

*** LANG=C
#!/bin/sh

LANG=C $*
exit $?

# EOF


-- System Information:
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-16-generic (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cfengine2 depends on:
ii  debconf [debconf-2.0]  1.5.20            Debian configuration management sy
ii  debianutils            2.28.2-0ubuntu1   Miscellaneous utilities specific t
ii  libc6                  2.7-10ubuntu3     GNU C Library: Shared libraries
ii  libdb4.6               4.6.21-6ubuntu1   Berkeley v4.6 Database Libraries [
ii  libssl0.9.8            0.9.8g-4ubuntu3.1 SSL shared libraries
ii  perl                   5.8.8-12          Larry Wall's Practical Extraction 

cfengine2 recommends no packages.

-- debconf-show failed




More information about the ubuntu-users mailing list