From owner-freebsd-questions@freebsd.org Wed May 26 04:13:16 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 885F0632FB3 for ; Wed, 26 May 2021 04:13:16 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from smtpg.telissant.net (smtpg.telissant.net [104.225.1.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fqcxl3XYGz3Q0n for ; Wed, 26 May 2021 04:13:14 +0000 (UTC) (envelope-from web@3dresearch.com) Received: from sacada.3dresearch.com (localhost [127.0.0.1]) by smtpg.telissant.net (Postfix) with ESMTP id 4Fqcxc4z8Fz2D1r6 for ; Wed, 26 May 2021 00:13:08 -0400 (EDT) X-Virus-Scanned: amavisd-new at telissant.net Received: from smtpg.telissant.net ([127.0.0.1]) by sacada.3dresearch.com (sacada.3dresearch.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QvUqHtBb1d_I for ; Wed, 26 May 2021 00:13:08 -0400 (EDT) Received: from elettra.3dresearch.com (unknown [71.112.242.160]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: elettra@sacada.3dresearch.com) by smtpg.telissant.net (Postfix) with ESMTPSA id 4Fqcxc1wmgz2D1r8 for ; Wed, 26 May 2021 00:13:08 -0400 (EDT) Received: from elettra.3dresearch.com (localhost [127.0.0.1]) by elettra.3dresearch.com (Postfix) with SMTP id CDDC18081B for ; Wed, 26 May 2021 00:13:07 -0400 (EDT) Date: Wed, 26 May 2021 00:11:53 -0400 From: Janos Dohanics To: FreeBSD Questions Subject: Re: Updating /usr/ports Message-Id: <20210526001153.e668d925df825e3486c5f7b9@3dresearch.com> In-Reply-To: References: <20210524124023.6372a3383876a1196cf81705@3dresearch.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Fqcxl3XYGz3Q0n X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of web@3dresearch.com designates 104.225.1.73 as permitted sender) smtp.mailfrom=web@3dresearch.com X-Spamd-Result: default: False [-0.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ENVFROM_SERVICE_ACCT(1.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[104.225.1.73:from]; ASN(0.00)[asn:36236, ipnet:104.225.1.0/24, country:US]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[71.112.242.160:received]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[3dresearch.com]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[104.225.1.73:from:127.0.2.255]; FROM_SERVICE_ACCT(1.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2021 04:13:16 -0000 On Mon, 24 May 2021 12:35:00 -0700 Kevin Oberman wrote: > On Mon, May 24, 2021 at 9:41 AM Janos Dohanics > wrote: > > > Hello, > > > > The Handbook says "As needed, update /usr/ports after the initial > > Git checkout: > > > > # git -C /usr/ports pull" > > > > [root@frigg ~]# portversion -v | grep -c "<" > > [Reading data from pkg(8) ... - 294 packages found - done] > > 7 > > > > [root@frigg ~]# git -C /usr/ports pull > > [...] > > 855 files changed, 8990 insertions(+), 7435 deletions(-) > > > > [root@frigg ~]# portversion -v | grep -c "<" > > [Reading data from pkg(8) ... - 294 packages found - done] > > 7 > > > > However, you also need to 'make index' which the Handbook does not > > mention: > > > > [root@frigg /usr/ports]# make index > > > > [root@frigg /usr/ports]# portversion -v | grep -c "<" > > [Reading data from pkg(8) ... - 294 packages found - done] > > [Updating the portsdb in /usr/ports ... - 31205 > > port entries found > > ......... > > 1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000.........24000.........25000.........26000.........27000.........28000.........29000.........30000.........31000.. ..... > > done] 12 > > > > -- > > Janos Dohanics > > > If you don't mind being a couple of hours out of date, "make > -C /usr/ports feetchindex.". The index file is generated every 3 > hours (I think), and it's a lot faster than making it yourself. Thanks, I know about 'make fetchindex' - this happens to be a reasonably fast machine. My point is though that 'git -C /usr/ports pull' apparently doesn't update the port index, and the Handbook doesn't say you need to do 'make index' or 'make fetchindex'. Also, 'portsnap fetch' && 'portsnap update' did update the index. My reading of the Handbook was that 'git -C /usr/ports pull' alone gave the same result as 'portsnap fetch' && 'portsnap update'. > Also, the grep is not needed. 'pkg version -vl<" (or, "-vL=" to catch > orphaned ports) will do the same thing. Don't worry if you are not > using ports. pkg does exactly the same things for both ports and > packages except for actually building ports. I thought that > portversion was long gone. It's not on either v12 or 13 on my systems. My bad habit, thank you for the reminder! -- Janos Dohanics