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

Bug#590436: Why does cups-bsd depend on update-inetd?



Control: tags -1 +patch

Le mardi, 25 février 2014, 17.14:20 Paul Slootman a écrit :
> I'm still requesting that it not depend on update-inetd, but instead
> e.g. recommend it.

Hmm, fair enough.

> > http://sources.debian.net/src/cups/1.7.1-5/debian/README.Debian#L137
> 
> That states that this ability is for testing purposes... those that
> want to test this situation should be smart enough to understand that
> update-inetd should be installed for this. The majority of cups-bsd
> users don't need update-inetd and forcing update-inetd on those
> people is unnecessary bloat.

I'll demote the dependency to a recommendation and add conditionals in 
the maintainer scripts then; patch attached.

Cheers,
OdyX
>From ae43ca3229dbf7af6da953dcde75775109608908 Mon Sep 17 00:00:00 2001
From: Didier Raboud <odyx@debian.org>
Date: Tue, 25 Feb 2014 18:54:45 +0100
Subject: [PATCH] Demote cups-bsd's update-inetd Recommendation to a Suggests,
 add conditionals in the maintainer scripts

Closes: #590436
---
 debian/README.Debian     |  4 ++--
 debian/control           |  3 +--
 debian/cups-bsd.postinst | 10 ++++++----
 debian/cups-bsd.postrm   |  4 +++-
 debian/cups-bsd.prerm    |  4 +++-
 5 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index fb05c81..6961dc8 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -158,8 +158,8 @@ lpr) side-by-side for testing purposes. However, it's known that cups
 conflicts with LPRng, since LPRng provides some System V printing commands
 as well; this problem will (hopefully) be dealt with in time.
 
-The cups-lpd daemon is disabled by default. To enable it install cups-bsd,
-run
+The cups-lpd daemon is disabled by default. To enable it install cups-bsd
+and update-inetd; then run:
 
    dpkg-reconfigure cups-bsd
 
diff --git a/debian/control b/debian/control
index d668d83..d1db9d5 100644
--- a/debian/control
+++ b/debian/control
@@ -344,9 +344,8 @@ Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, 
  cups-client (= ${binary:Version}),
  debconf | debconf-2.0,
- update-inetd,
  cups-common (>= ${source:Version})
-Suggests: cups
+Suggests: cups, update-inetd
 Conflicts: lpr, lprng
 Replaces: lpr
 Provides: lpr
diff --git a/debian/cups-bsd.postinst b/debian/cups-bsd.postinst
index 9a13565..e12eac6 100644
--- a/debian/cups-bsd.postinst
+++ b/debian/cups-bsd.postinst
@@ -15,10 +15,12 @@ case "$1" in
 	    fi
 	fi
 
-	# Add cups-lpd to inetd.conf
-	db_get cups-bsd/setuplpd
-	if [ "$RET" = "true" ]; then
-	    update-inetd --add 'printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd'
+	if [ -x /usr/sbin/update-inetd ]; then
+	    # Add cups-lpd to inetd.conf
+	    db_get cups-bsd/setuplpd
+	    if [ "$RET" = "true" ]; then
+	        update-inetd --add 'printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd'
+	    fi
 	fi
     ;;
 
diff --git a/debian/cups-bsd.postrm b/debian/cups-bsd.postrm
index d3ba590..fbda464 100644
--- a/debian/cups-bsd.postrm
+++ b/debian/cups-bsd.postrm
@@ -5,7 +5,9 @@ set -e
 case "$1" in
     purge)
         # Remove inetd entry
-        update-inetd --pattern cups-lpd --remove printer 2>/dev/null || true
+	if [ -x /usr/sbin/update-inetd ]; then
+            update-inetd --pattern cups-lpd --remove printer 2>/dev/null || true
+        fi
 
         ;;
 
diff --git a/debian/cups-bsd.prerm b/debian/cups-bsd.prerm
index 17cb219..85eff68 100644
--- a/debian/cups-bsd.prerm
+++ b/debian/cups-bsd.prerm
@@ -12,7 +12,9 @@ case "$1" in
 	rm -rf /usr/share/doc/cups-bsd
 
 	# Disable inetd entry
-	update-inetd --pattern cups-lpd --disable printer
+	if [ -x /usr/sbin/update-inetd ]; then
+	    update-inetd --pattern cups-lpd --disable printer
+	fi
         ;;
     failed-upgrade)
         ;;
-- 
1.9.0


Reply to: