Bug 183095 - make index fails without perl after wasting significant time
Summary: make index fails without perl after wasting significant time
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-19 06:20 UTC by Niels Endres
Modified: 2013-10-27 14:30 UTC (History)
0 users

See Also:


Attachments
file.diff (411 bytes, patch)
2013-10-19 06:20 UTC, Niels Endres
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Endres 2013-10-19 06:20:00 UTC
If perl is not installed on a system when running make index in /usr/ports, significant time is spent building the temp index files for each category before the entire process fails.

The supplied patch performs a quick check first that will fail if perl is not in the system path and executable prior to performing the bulk of the work.

How-To-Repeat: attempt to make index without perl
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2013-10-20 20:58:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Portmgr territory.
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2013-10-20 21:12:57 UTC
State Changed
From-To: open->suspended

We will be removing the perl dependency within the next month all 
together!
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2013-10-20 21:13:22 UTC
Responsible Changed
From-To: portmgr->bdrewery

Take for when I finish testing the new index patch
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-10-27 14:22:09 UTC
Author: bdrewery
Date: Sun Oct 27 14:22:02 2013
New Revision: 331775
URL: http://svnweb.freebsd.org/changeset/ports/331775

Log:
  - Revert r329851 and again allow using portsnap's make_index by default,
    if available, for 'make index'. This removes the need to have
    perl installed. [1]
  - Fix output of the file to have the proper /usr/ports/ORIGIN regardless
    of real PORTSDIR or CURDIR [2]
  
  PR:		ports/183095 [1]
  Submitted by:	ak [2]
  With hat:	portmgr

Modified:
  head/Makefile

Modified: head/Makefile
==============================================================================
--- head/Makefile	Sun Oct 27 14:10:27 2013	(r331774)
+++ head/Makefile	Sun Oct 27 14:22:02 2013	(r331775)
@@ -105,11 +105,11 @@ INDEX_SHELL=		/bin/sh
 INDEX_PORTS=.
 .endif
 
-#.if exists(/usr/libexec/make_index)
-#MAKE_INDEX=	/usr/libexec/make_index /dev/stdin
-#.else
+.if exists(/usr/libexec/make_index)
+MAKE_INDEX=	/usr/libexec/make_index /dev/stdin
+.else
 MAKE_INDEX=	perl ${.CURDIR}/Tools/make_index
-#.endif
+.endif
 
 ${INDEXDIR}/${INDEXFILE}:
 	@${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
@@ -144,7 +144,8 @@ ${INDEXDIR}/${INDEXFILE}:
 	cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; ${MAKE_INDEX}) | \
 		sed -e 's/  */ /g' -e 's/|  */|/g' -e 's/  *|/|/g' -e 's./..g' | \
 		sort -t '|' +1 -2 | \
-		sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; \
+		sed -Ee 's../.g' -e ':a' -e 's|/[^/]+/\.\.||; ta' \
+		-e 's|${.CURDIR}|/usr/ports|g' > ${INDEXDIR}/${INDEXFILE}.tmp; \
 	if [ "${INDEX_PRISTINE}" != "" ]; then \
 		sed -e "s,$${LOCALBASE},/usr/local," ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \
 	else \
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Bryan Drewery freebsd_committer freebsd_triage 2013-10-27 14:22:53 UTC
State Changed
From-To: suspended->closed

perl is no longer required to build index.