ports/74750: [ PORT FIX ] multimedia/freevo (build fails with BATCH)
Lewis Thompson
purple at lewiz.net
Mon Dec 6 00:20:20 UTC 2004
>Number: 74750
>Category: ports
>Synopsis: [ PORT FIX ] multimedia/freevo (build fails with BATCH)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 06 00:20:19 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Lewis Thompson
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD black.fajita.org 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Mon Nov 8 18:05:07 GMT 2004 root at black.fajita.org:/usr/src/sys/i386/compile/BLACK i386
>Description:
multimedia/mplayer fails to build when BATCH is defined
(pkg-install script fails to add group/user and create home dir).
Notified by: Kris Kennaway
>How-To-Repeat:
Build with BATCH=1
>Fix:
diff -ruN freevo.orig/pkg-install freevo/pkg-install
--- freevo.orig/pkg-install Thu Dec 2 21:27:31 2004
+++ freevo/pkg-install Mon Dec 6 00:07:55 2004
@@ -25,20 +25,16 @@
yesno() {
local dflt question answer
- if [ ! -n "$BATCH" ]; then
- question=$1
- dflt=$2
- while :; do
+ question=$1
+ dflt=$2
+ while :; do
answer=$(ask "${question}" "${dflt}")
case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
esac
echo "Please answer yes or no."
- done
- else
- return ${dflt}
- fi
+ done
}
creategroup() {
@@ -46,7 +42,7 @@
echo "You already have a group \"${group}\", so I will use it."
else
echo "You need a group \"${group}\"."
- if (yesno "Would you like me to create it" y); then
+ if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then
/usr/sbin/pw groupadd ${group} -g ${gid} || exit
echo "Done."
else
@@ -62,7 +58,7 @@
pw usermod "${user}" -d ${home}
else
echo "You need a user \"${user}\"."
- if (yesno "Would you like me to create it" y); then
+ if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then
/usr/sbin/pw useradd ${user} -u ${uid} -g ${group} -d ${home} \
-s /bin/sh -c "Freevo Owner" || exit
echo "Done."
@@ -80,7 +76,7 @@
chmod ${perm} ${home} # Should we recurse?
else
echo "You need a cache directory \"${home}\"."
- if (yesno "Would you like me to create it" y); then
+ if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then
mkdir ${home}
chown ${user}:${group} ${home}
chmod ${perm} ${home}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list