From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Feb 23 07:50:22 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCCEF16A4CE for ; Mon, 23 Feb 2004 07:50:22 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FB2A43D2D for ; Mon, 23 Feb 2004 07:50:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i1NFoMbv001314 for ; Mon, 23 Feb 2004 07:50:22 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i1NFoMit001313; Mon, 23 Feb 2004 07:50:22 -0800 (PST) (envelope-from gnats) Date: Mon, 23 Feb 2004 07:50:22 -0800 (PST) Message-Id: <200402231550.i1NFoMit001313@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Ulrich Spoerlein Subject: Re: ports/63222: [patch] Remove useless use of cat 5/5 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ulrich Spoerlein List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2004 15:50:22 -0000 The following reply was made to PR ports/63222; it has been noted by GNATS. From: Ulrich Spoerlein To: Michael Nottebrock Cc: Subject: Re: ports/63222: [patch] Remove useless use of cat 5/5 Date: Mon, 23 Feb 2004 16:46:01 +0100 On Sun, 22.02.2004 at 15:38:18 +0100, Michael Nottebrock wrote: > Impressive waste of time, way to go. Just making sure, new porters don't see bad examples, so they don't repeat them. Ideally I would place some default %%foo%% expansions into bsd.port.mk, that way you could have the substituted pkg-message in the package by default. But I'm pretty sure people are against this.=20 > > =A0post-install: > > =A0=A0=A0=A0=A0=A0=A0=A0@ ${MKDIR} ${PREFIX}/share/postgresql ;\ > > -=A0=A0=A0=A0=A0=A0=A0${CAT} ${FILESDIR}/post-install-notes ${PKGMESSAG= E} |\ > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0${SED} "s|/usr/local|${PR= EFIX}|g" |\ > > +=A0=A0=A0=A0=A0=A0=A0${SED} "s|/usr/local|${PREFIX}|g" ${FILESDIR}/pos= t-install-notes \ > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0${PKGMESSAGE} |\ > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0tee ${PREFIX}/share/pos= tgresql/post-install-notes >=20 > I'd bet that "fix" is actually slower than the original. At least on my system, you lose this bet: % ll gst.patch pam.list -rw-r--r-- 1 q wheel 1196 Feb 8 21:41 gst.patch -rw-r--r-- 1 q wheel 5521 Feb 17 13:37 pam.list % time (sed s/foo/bar/ gst.patch pam.list >/dev/null) 0.00s user 0.01s system 70% cpu 0.011 total % time (sed s/foo/bar/ gst.patch pam.list >/dev/null) 0.01s user 0.00s system 86% cpu 0.009 total % time (sed s/foo/bar/ gst.patch pam.list >/dev/null) 0.00s user 0.00s system 0% cpu 0.009 total % time (sed s/foo/bar/ gst.patch pam.list >/dev/null) 0.01s user 0.00s system 97% cpu 0.008 total % time (sed s/foo/bar/ gst.patch pam.list >/dev/null) 0.00s user 0.01s system 357% cpu 0.002 total ^^^ wtf? % time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null) 0.00s user 0.01s system 49% cpu 0.016 total % time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null) 0.00s user 0.01s system 47% cpu 0.016 total % time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null) 0.00s user 0.01s system 49% cpu 0.016 total % time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null) 0.00s user 0.01s system 53% cpu 0.015 total % time (cat gst.patch pam.list|sed s/foo/bar/ >/dev/null) 0.00s user 0.01s system 56% cpu 0.014 total ^^ CPU usage is lower on overall, which indicates increased latency due to I/O overhead(??). Ulrich Sp=F6rlein --=20 PGP Key ID: F0DB9F44 Get it while it's hot! PGP Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 I abhor a system designed for the "user", if that word is a coded pejorative meaning "stupid and unsophisticated". -- Ken Thompson