Speeding up gnome2 installation
Joe Marcus Clarke
marcus at marcuscom.com
Thu Apr 29 02:49:20 GMT 2004
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
>
> Thanks!
> Thomas.
>
> cvs diff: Diffing .
> Index: pkg-install
> ===================================================================
> 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=/bin:/usr/bin:/sbin:/usr/sbin:${PATH}
> export PATH
>
> +tmp_pkg_info=`mktemp -t gnome_install_pkg_info`
> +trap "rm -f ${tmp_pkg_info}" 0
> +
> +pkg_info > ${tmp_pkg_info}
> +
> if [ "$2" = "PRE-INSTALL" ]; then
> GNOME_ONE_DESKTOP="gnomecore gnomeapplets gnomemedia gnomeutils gtop libgtop sawfish nautilus gedit xalf bugbuddy gnomegames gdm eog ggv gnomeaudio"
> 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 ""
--
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20040428/5c468cb1/attachment.bin
More information about the freebsd-gnome
mailing list