Skip site navigation (1)Skip section navigation (2)

ports/169585: [PATCH] net-mgmt/send Use OSVERSION instead of checking for file

From: Chris Rees <crees@FreeBSD.org>
Date: Sun, 1 Jul 2012 21:23:42 +0100 (BST)
Subject: [PATCH] net-mgmt/send Use OSVERSION instead of checking for file
Send-pr version: 3.113
Number: 169585
Category: ports
Synopsis: [PATCH] net-mgmt/send Use OSVERSION instead of checking for file
Severity: non-critical
Priority: low
Responsible: crees
State: closed
Class: change-request
Arrival-Date: Sun Jul 01 20:30:11 UTC 2012
Closed-Date: Tue Jul 17 19:36:28 UTC 2012
Last-Modified: Tue Jul 17 19:36:28 UTC 2012
Originator: Chris Rees
Release: FreeBSD 9.0-RELEASE amd64
Organization
Environment
System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64
Description
Send should not check for the existence of a file; it is slower than an OSVERSION check and also fails to register as a DUD on pointyhat-west

http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.8-exp.20120218044950.pointyhat-west/send-0.3.log

As a nice side effect, make index will be a few nanoseconds faster.
How-To-Repeat
Fix
Download patch.txt
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net-mgmt/send/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 2 Jan 2011 17:56:14 -0000 1.5
+++ Makefile 1 Jul 2012 20:21:08 -0000
@@ -21,7 +21,9 @@
 PKGMESSAGE= ${WRKDIR}/pkg-message
 PORTDOCS= README UserGuide.pdf
 
-.if !exists(/usr/include/netinet6/send.h)
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 900042
 IGNORE= is supported only on 9.0 and later
 .endif
 
@@ -42,4 +44,4 @@
 .endif
  @${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Release-Note
Audit-Trail
Responsible Changed
From-To: freebsd-ports-bugs->anchie
By: edwin
When: Sun Jul 1 20:30:26 UTC 2012
Why: Over to maintainer (via the GNATS Auto Assign Tool)
Responsible Changed
From-To: anchie->crees
By: crees
When: Tue Jul 17 19:33:09 UTC 2012
Why: I'll take it.
State Changed
From-To: open->closed
By: crees
When: Tue Jul 17 19:36:27 UTC 2012
Why: Committed.
Unformatted