Subject: pkg/19146: icepref fails to run with python versions other than 2.1
To: None <gnats-bugs@gnats.netbsd.org>
From: Julio Merino <jmmv@menta.net>
List: netbsd-bugs
Date: 11/23/2002 13:27:25
>Number:         19146
>Category:       pkg
>Synopsis:       icepref fails to run with python versions other than 2.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 23 04:23:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6K
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar.local 1.6K NetBSD 1.6K (DARKSTAR) #133: Sun Nov 17 21:31:10 CET 2002 sysbuild@darkstar.local:/var/sysbuild/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	icepref currently contains a patch, patch-ab, which hardcodes
	python-2.1's binary name inside icepref's binary. This is wrong,
	because if you have python-2.2 (or other versions), the program
	will not run properly.

	The package should use PYTHON_PATCH_SCRIPTS to modify the icepref
	script "on the fly", depending on the installed python version.
>How-To-Repeat:
	Install python-2.2, then install wm/icepref and start icepref.
>Fix:
	This patch should do the trick:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/wm/icepref/Makefile,v
retrieving revision 1.2
diff -u -u -r1.2 Makefile
--- Makefile	2002/10/24 22:48:07	1.2
+++ Makefile	2002/11/23 12:18:55
@@ -2,6 +2,7 @@
 #
 
 DISTNAME=	icepref-1.1
+PKGREVISION=	1
 CATEGORIES=	wm
 MASTER_SITES=	ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
 
@@ -14,5 +15,8 @@
 
 USE_BUILDLINK2=	yes
 
+PYTHON_PATCH_SCRIPTS=	icepref
+
+.include "../../lang/python/application.mk"
 .include "../../x11/pygtk/buildlink2.mk"
 .include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/wm/icepref/distinfo,v
retrieving revision 1.3
diff -u -u -r1.3 distinfo
--- distinfo	2002/08/11 04:13:35	1.3
+++ distinfo	2002/11/23 12:18:55
@@ -3,4 +3,4 @@
 SHA1 (icepref-1.1.tar.gz) = 025c0390f7acb6768ee0b41c733bf9a3e59949b8
 Size (icepref-1.1.tar.gz) = 29418 bytes
 SHA1 (patch-aa) = 0dd492ea8cf440a0076986245f61ddf1281a526a
-SHA1 (patch-ab) = 5fab42c6c557bbe87df7e37ba2bbf196d17f3dbc
+SHA1 (patch-ab) = d10a096c1a15a1ea4e56283c44276492a2d39b80
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/wm/icepref/patches/patch-ab,v
retrieving revision 1.1
diff -u -u -r1.1 patch-ab
--- patch-ab	2002/06/21 15:09:47	1.1
+++ patch-ab	2002/11/23 12:18:55
@@ -2,12 +2,6 @@
 
 --- icepref.orig	Thu Jan  6 00:16:04 2000
 +++ icepref
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python2.1
- 
- ##############################################################################
- #                                IcePref 1.0
 @@ -1710,7 +1710,7 @@
  	    
  	    exec_path = commands.getoutput('whereis icewm')
>Release-Note:
>Audit-Trail:
>Unformatted: