From owner-freebsd-ports@FreeBSD.ORG Sat Aug 15 18:32:06 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50F99106568B for ; Sat, 15 Aug 2009 18:32:06 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id 10D2D8FC43 for ; Sat, 15 Aug 2009 18:32:05 +0000 (UTC) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id E82E019E044; Sat, 15 Aug 2009 20:32:02 +0200 (CEST) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id BBCE219E043; Sat, 15 Aug 2009 20:31:57 +0200 (CEST) Message-ID: <4A86FF1E.1030705@quip.cz> Date: Sat, 15 Aug 2009 20:31:58 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Thomas Backman References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: portversion and pkg_version have different opinions on current versions X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 18:32:06 -0000 Thomas Backman wrote: [...] > [root@chaos ~]# pkgdb -aF > ---> Checking the package registry database > [root@chaos ~]# portversion -l '<' > dnsmasq < > ezm3 < > libtool < > python26 < > [root@chaos ~]# pkg_version | awk '$2 !~ /=/' > [root@chaos ~]# portupgrade -a > [root@chaos ~]# [...] As was mentioned, you can use pkg_version -L =, or you can compare it with INDEX.db instead of ports tree: pkg_version -IL =. This is significantly faster. pkg_version -L = Usr: 7.286s Krnl: 3.984s Totl: 0:31.77s pkg_version -IL = Usr: 0.195s Krnl: 0.015s Totl: 0:00.21s And if you want to know the version of newer (available) port, you can use pkg_version -vIL = It gives you something like this: png-1.2.35 < needs updating (index has 1.2.38) postfix-2.5.6,1 < needs updating (index has 2.6.3,1) vim-lite-7.2.209 < needs updating (index has 7.2.239) Miroslav Lachman