Bug 67762 - portupgrade of stunnel asks for input even when run with BATCH=1
Summary: portupgrade of stunnel asks for input even when run with BATCH=1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Peter Pentchev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-09 19:00 UTC by Linus Sjoberg
Modified: 2005-06-06 00:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Linus Sjoberg 2004-06-09 19:00:42 UTC
When doing a ports upgrade using
# BATCH=1 portupgrade -a
you expect all upgrades to be performed without any interaction with the user. This is not true for stunnel.

When I checked my portupgrade today it was hung waiting for input with the prompt:
"Remove group stunnel? [y/n]"

Appearently this is due to the stunnel deinstall-script. After entering a 'n' the upgrade continued as espected.

Either the deinstall should not ask the question or otherwise stunnel should not be upgraded when running portupgrade when BATCH is set.

Fix: 

Check for BATCH in stunnel Makefile.
How-To-Repeat: I have not tried to reproduce this, but it should suffice to run portupgrade with BATCH set when there is a newer stunnel available.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2004-06-09 23:05:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->roam

Over to maintainer.
Comment 2 Vasil Dimov 2005-04-13 11:45:28 UTC
Here is the simple fix for BATCH mode while deinstalling stunnel:

--- pkg-deinstall.orig	Wed Apr 13 13:19:57 2005
+++ pkg-deinstall	Wed Apr 13 13:31:18 2005
@@ -13,7 +13,7 @@
 
     question=$1
     default=$2
-    if [ -z "${PACKAGE_BUILDING}" ]; then
+    if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
 	read -p "${question} [${default}]? " answer
     fi
     if [ x${answer} = x ]; then

http://www.freebsd.org/cgi/query-pr.cgi?pr=67762
Comment 3 Florent Thoumie freebsd_committer freebsd_triage 2005-06-06 00:03:24 UTC
State Changed
From-To: open->closed

Committed, thanks!