Date: Tue, 6 Jul 2004 14:01:26 +0200 (CEST) From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> To: FreeBSD-gnats-submit@FreeBSD.org Cc: hsn@netmag.cz Subject: ports/68723: [PATCH] sysutils/portindex: use the full-path for python executable Message-ID: <200407061201.i66C1QtB090369@arabica.esil.univ-mrs.fr> Resent-Message-ID: <200407061210.i66CAM7m097871@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 68723 >Category: ports >Synopsis: [PATCH] sysutils/portindex: use the full-path for python executable >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jul 06 12:10:21 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Herve Quiroz >Release: FreeBSD 5.2.1-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD arabica.esil.univ-mrs.fr 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #3: Thu May 6 20:17:47 CEST >Description: I use to run portindex in some custom script which is run by cron(8). Unfortunately, the path of the python(1) executable is missing in portindex (and other provided shell scripts) and that prevents portindex to be run with an empty PATH variable. This patch provides a little "sed magic" to the set of executable to hardcode the path of python(1) using the provided ${PYTHON_CMD} from bsd.python.mk. NOTE: bumped PORTREVISION Port maintainer (hsn@netmag.cz) is cc'd. Generated with FreeBSD Port Tools 0.50 >How-To-Repeat: Just try to run 'portindex' with an empty PATH variable. >Fix: --- portindex-12_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/Makefile /usr/ports/sysutils/portindex/Makefile --- /usr/ports/sysutils/portindex.original/Makefile Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/Makefile Tue Jul 6 13:46:21 2004 @@ -7,6 +7,7 @@ PORTNAME= portindex PORTVERSION= 12 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://home.tiscali.cz:8080/~cz210552/distfiles/ \ http://www.oook.cz/bsd/distfiles/ @@ -66,7 +67,7 @@ do-build: ${REINPLACE_CMD} -e "s,ports.pck,/var/db/portindex.pck," ${WRKSRC}/freebsdports.py .for i in ${EXECUTABLES} - ${SED} -e "s,%%DATADIR%%,${DATADIR}," ${FILESDIR}/${i}.sh > ${WRKSRC}/${i} + ${SED} -e "s,%%DATADIR%%,${DATADIR}, ; s,%%PYTHON_CMD%%,${PYTHON_CMD}," ${FILESDIR}/${i}.sh > ${WRKSRC}/${i} .endfor do-install: diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/loadindex.sh /usr/ports/sysutils/portindex/files/loadindex.sh --- /usr/ports/sysutils/portindex.original/files/loadindex.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/loadindex.sh Tue Jul 6 13:45:45 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/loadindex.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/loadindex.py $* diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/minorupdates.sh /usr/ports/sysutils/portindex/files/minorupdates.sh --- /usr/ports/sysutils/portindex.original/files/minorupdates.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/minorupdates.sh Tue Jul 6 13:45:49 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/minorupdates.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/minorupdates.py $* diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/portindex.sh /usr/ports/sysutils/portindex/files/portindex.sh --- /usr/ports/sysutils/portindex.original/files/portindex.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/portindex.sh Tue Jul 6 13:44:26 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/indexer.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/indexer.py $* diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/portreadmes.sh /usr/ports/sysutils/portindex/files/portreadmes.sh --- /usr/ports/sysutils/portindex.original/files/portreadmes.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/portreadmes.sh Tue Jul 6 13:45:52 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/updatereadmes.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/updatereadmes.py $* diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/query.sh /usr/ports/sysutils/portindex/files/query.sh --- /usr/ports/sysutils/portindex.original/files/query.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/query.sh Tue Jul 6 13:45:54 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/query.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/query.py $* diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/updateall.sh /usr/ports/sysutils/portindex/files/updateall.sh --- /usr/ports/sysutils/portindex.original/files/updateall.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/updateall.sh Tue Jul 6 13:45:56 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/updateall.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/updateall.py $* diff -ruN --exclude=CVS /usr/ports/sysutils/portindex.original/files/updinst.sh /usr/ports/sysutils/portindex/files/updinst.sh --- /usr/ports/sysutils/portindex.original/files/updinst.sh Tue Jul 6 13:44:02 2004 +++ /usr/ports/sysutils/portindex/files/updinst.sh Tue Jul 6 13:45:59 2004 @@ -1,2 +1,2 @@ #! /bin/sh -exec /usr/bin/env python %%DATADIR%%/updinst.py $* +exec /usr/bin/env %%PYTHON_CMD%% %%DATADIR%%/updinst.py $* --- portindex-12_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407061201.i66C1QtB090369>