severity 603827 serious
retitle 603827 fails to install noninteractively if procps is not installed
forcemerge 603827 606792
quit

Jonathan Nieder wrote:

> runit.config contains the following:
> 
>       if `ps -p 1 >/dev/null`; then
>         db_input low runit/signalinit || :
>       else
>         db_input high runit/signalinit || :
>       fi
>       db_go || :
> 
> If procps is not installed, the result is
> 
>       /var/lib/dpkg/info/runit.config: 18: ps: not found
> 
> which results in the "db_input high" branch being taken.  This breaks
> automated installations on minimal setups.
> 
> Presumably the .config script should skip the question when ps is not
> present and runit should Depends on procps to ensure ps is present
> when postinst runs.

Like this, maybe?
---
 debian/changelog    |    8 ++++++++
 debian/control      |    2 +-
 debian/runit.config |   12 +++++++-----
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b0a6f1f..06f185c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+runit (2.1.1-6.1) local; urgency=low
+
+  * debian/runit.config: skip preconfiguration if ps is not
+    installed.
+  * debian/control: Depends: procps (closes: #603827).
+
+ -- Jonathan Nieder <jrnie...@gmail.com>  Wed, 15 Dec 2010 21:43:41 -0600
+
 runit (2.1.1-6) unstable; urgency=high
 
   * debian/rules: don't set -D_FILE_OFFSET_BITS=64 on sparc (fixes
diff --git a/debian/control b/debian/control
index 524f333..2098d2d 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.8.0.1
 
 Package: runit
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: procps, ${shlibs:Depends}
 Recommends: fgetty
 Suggests: runit-run, socklog-run
 Description: system-wide service supervision
diff --git a/debian/runit.config b/debian/runit.config
index 86ae985..f23d62d 100644
--- a/debian/runit.config
+++ b/debian/runit.config
@@ -11,9 +11,11 @@ if test "$1" = configure && test -n "$2" &&
   exit 0
 fi
 
-if `ps -p 1 >/dev/null`; then
-  db_input low runit/signalinit || :
-else
-  db_input high runit/signalinit || :
+if which ps >/dev/null 2>&1; then
+  if ps -p 1 >/dev/null; then
+    db_input low runit/signalinit || :
+  else
+    db_input high runit/signalinit || :
+  fi
+  db_go || :
 fi
-db_go || :
-- 
1.7.2.3




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to