Subject: pkg/13801: abcde throws an warnings when used on a multi-artist CD
To: None <gnats-bugs@gnats.netbsd.org>
From: None <chris@paradox.demon.co.uk>
List: netbsd-bugs
Date: 08/27/2001 23:57:35
>Number:         13801
>Category:       pkg
>Synopsis:       abcde throws an warnings when used on a multi-artist CD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 27 15:53:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        27-08-01
>Organization:
>Environment:
System: NetBSD pinky.paradox.demon.co.uk 1.5X NetBSD 1.5X (PINKY) #15: Sun Aug 26 17:16:22 BST 2001 chris@pinky.paradox.demon.co.uk:/usr/obj/kern/PINKY i386
Architecture: i386
Machine: i386
>Description:
	Use abcde on a multi artist CD, the following msg is output if you just press return to use the defaults:
Which style of multiple artist entries is it? [1-6] (1):
[: 0: unexpected operator
[: 6: unexpected operator
>How-To-Repeat:
	Use abcde as above.
>Fix:
	The following patch works for me, as it forces printf to actually see a value, not an empty arg, but might not work for all cases:
--- /usr/pkg/bin/abcde  Fri Aug 17 11:13:31 2001
+++ /extra2/chris/abcde Mon Aug 27 23:52:15 2001
@@ -757,7 +757,8 @@ do_cddbedit ()
                        echo $DEFAULTSTYLE >&2
                        VARIOUSARTISTSTYLE=$DEFAULTSTYLE
                fi
-               VARIOUSARTISTSTYLE=$(echo $VARIOUSARTISTSTYLE | xargs printf %d)
+               VARIOUSARTISTSTYLE=$(echo 0$VARIOUSARTISTSTYLE | xargs printf %d)
+               echo "variousartiststyle = $VARIOUSARTISTSTYLE"
                # If they press Enter, then the default style (0) was chosen
                while [ $VARIOUSARTISTSTYLE -lt 0 ] || [ $VARIOUSARTISTSTYLE -gt 6 ]; do
                        echo "Invalid selection. Please choose a number between 1 and 6."
>Release-Note:
>Audit-Trail:
>Unformatted: