From owner-freebsd-gnome@FreeBSD.ORG Wed Apr 28 19:49:20 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ACD116A524; Wed, 28 Apr 2004 19:49:18 -0700 (PDT) Received: from creme-brulee.marcuscom.com (rrcs-midsouth-24-172-16-118.biz.rr.com [24.172.16.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C13143D5A; Wed, 28 Apr 2004 19:49:18 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from [192.168.1.4] (shumai.marcuscom.com [192.168.1.4]) i3T2lNOW057525; Wed, 28 Apr 2004 22:47:23 -0400 (EDT) (envelope-from marcus@marcuscom.com) From: Joe Marcus Clarke To: Thomas Quinot In-Reply-To: <20040426092046.GA30821@melusine.cuivre.fr.eu.org> References: <20040426092046.GA30821@melusine.cuivre.fr.eu.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-EPHstDpNS8vi6/JE6prI" Organization: MarcusCom, Inc. Message-Id: <1083206943.58600.22.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 28 Apr 2004 22:49:03 -0400 cc: FreeBSD GNOME Users Subject: Re: Speeding up gnome2 installation X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2004 02:49:20 -0000 --=-EPHstDpNS8vi6/JE6prI Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2004-04-26 at 05:20, Thomas Quinot wrote: > The pkg-install script for gnome currently runs pkg_info in a loop, > which is costly if many packages are stored under /usr/ports/packages. > I'd like to suggest that pkg_info be run only once and its output stored > in a temp file, to make the installation quicker. Please review the > attached patch. Committed, thanks! Joe >=20 > Thanks! > Thomas. >=20 > cvs diff: Diffing . > Index: pkg-install > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/ports/x11/gnome2/pkg-install,v > retrieving revision 1.9 > diff -u -r1.9 pkg-install > --- pkg-install 5 Apr 2004 03:11:31 -0000 1.9 > +++ pkg-install 26 Apr 2004 09:17:14 -0000 > @@ -3,10 +3,15 @@ > PATH=3D/bin:/usr/bin:/sbin:/usr/sbin:${PATH} > export PATH > =20 > +tmp_pkg_info=3D`mktemp -t gnome_install_pkg_info` > +trap "rm -f ${tmp_pkg_info}" 0 > + > +pkg_info > ${tmp_pkg_info} > + > if [ "$2" =3D "PRE-INSTALL" ]; then > GNOME_ONE_DESKTOP=3D"gnomecore gnomeapplets gnomemedia gnomeutils g= top libgtop sawfish nautilus gedit xalf bugbuddy gnomegames gdm eog ggv gno= meaudio" > for package in ${GNOME_ONE_DESKTOP}; do > - if pkg_info | grep "^${package}-[0-9]" >/dev/null 2>&1; then > + if grep "^${package}-[0-9]" ${tmp_pkg_info} >/dev/null 2>&1; then > echo "${package} was detected on the system. This package is part= of the GNOME 1.x" > echo "desktop, and cannot coexist with the GNOME 2.2 desktop." > echo "" --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-EPHstDpNS8vi6/JE6prI Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAkG0fb2iPiv4Uz4cRAkD7AJ4sZuxUlhCd8ewbn+0uZNrkd6zHtQCeN/IT fj7lVRS+CsBt3KaMgfAqut8= =1tiA -----END PGP SIGNATURE----- --=-EPHstDpNS8vi6/JE6prI--