From ak03@gte.com  Wed Nov 28 10:01:18 2001
Return-Path: <ak03@gte.com>
Received: from h132-197-97-45.gte.com (h132-197-179-27.gte.com [132.197.179.27])
	by hub.freebsd.org (Postfix) with ESMTP
	id 6341437B41A; Wed, 28 Nov 2001 10:01:17 -0800 (PST)
Received: (from ak03@localhost)
	by h132-197-97-45.gte.com (8.11.6/8.11.4) id fASI1Gc67150;
	Wed, 28 Nov 2001 13:01:16 -0500 (EST)
	(envelope-from ak03)
Message-Id: <200111281801.fASI1Gc67150@h132-197-97-45.gte.com>
Date: Wed, 28 Nov 2001 13:01:16 -0500 (EST)
From: "Alexander N. Kabaev" <ak03@gte.com>
Reply-To: "Alexander N. Kabaev" <ak03@gte.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: kde@freebsd.org
Subject: bashisms in kdelibs/kdeprint/filters/imagetops script
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32358
>Category:       ports
>Synopsis:       bashisms in kdelibs/kdeprint/filters/imagetops script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 28 10:10:00 PST 2001
>Closed-Date:    Mon Dec 3 19:51:55 PST 2001
>Last-Modified:  Mon Dec 03 19:52:22 PST 2001
>Originator:     Alexander N. Kabaev
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD kanpc.gte.com 5.0-CURRENT FreeBSD 5.0-CURRENT #7: Mon Nov 26 13:00:28 EST 2001 root@kanpc.gte.com:/usr/src/sys/i386/compile/KANPC i386


	
>Description:
	There is a imagetops script installed kdelibs2/kdeprint which uses
	bash specific constructs, even though it claims to be a sh script.
	Our /bin/sh obviously fails executing it. Attached patch makes it
	work correctly with our shell. Warning - it introduces a new
	patch file in the port 'files' directory.
>How-To-Repeat:
	imagetops <any image>
>Fix:

Index: files/patch-kdeprint::imagetops
===================================================================
RCS file: files/patch-kdeprint::imagetops
diff -N files/patch-kdeprint::imagetops
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-kdeprint::imagetops	28 Nov 2001 17:36:09 -0000
@@ -0,0 +1,25 @@
+--- kdeprint/filters/imagetops.orig	Wed Nov 28 12:25:21 2001
++++ kdeprint/filters/imagetops	Wed Nov 28 12:29:50 2001
+@@ -27,11 +27,17 @@
+ # check the file mime type, and set the command correspondingly
+ cmd=
+ magic=`file -bi $FILE`
+-if [[ $magic != image/* ]] ; then
+-	echo "Not an image"
+-	exit 1;
+-fi
+-case ${magic/image\//} in
++
++case $magic in
++	image/*)
++		;;
++	*)
++		echo "Not an image"
++		exit 1;
++		;;
++esac
++
++case ${magic##image\/} in
+ 	jpeg)
+ 		cmd="djpeg -pnm"
+ 		;;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->kde 
Responsible-Changed-By: petef 
Responsible-Changed-When: Wed Nov 28 10:11:51 PST 2001 
Responsible-Changed-Why:  
Over to maintainers 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32358 
State-Changed-From-To: open->closed 
State-Changed-By: will 
State-Changed-When: Mon Dec 3 19:51:55 PST 2001 
State-Changed-Why:  
Fixed in upgrade to 2.2.2, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32358 
>Unformatted:
