From owner-freebsd-questions@freebsd.org Fri May 28 00:02:12 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 3502A6482BC for ; Fri, 28 May 2021 00:02:12 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FrlH573Gjz3JXG for ; Fri, 28 May 2021 00:02:09 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-oi1-x22e.google.com with SMTP id t24so2571066oiw.3 for ; Thu, 27 May 2021 17:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b3ICzfDI0Ii/1cF17Vo3kzO5MtVe7twfFzUchufzV9s=; b=PhElvXlzDbrDYbJWwqV5vpwGbLAf0Ws9bzMgt82jOrXJHCkSwSGmCzfqNydjo19qSZ MnHycC7/Ba2TWPJGVvdFOqBpaUWGClSGgrQLd6YqWQft/4/SbrFEtd1SfuaJ8CKprQtW HoX5ZBOEpRnBzvUbI3jS4YUphuJR5DCNTFRw/0c5NNdPqyShVSNed9z4IKgJ1f7Wsjcu DO3CvqaV/vPWEeqzMWWm4aLeBbPl5jUfvpEmdx5WT+4i08nFKPJWBiBzMCsARgtZoOCM AZUjLUYTtcZxDVsBp50zKOAspYr8vIRfw0fFXPzyrUobyzZNlw8VAuhKWsN4Cu/tdNG5 Aj+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b3ICzfDI0Ii/1cF17Vo3kzO5MtVe7twfFzUchufzV9s=; b=ZYp2DctuvsIV5sncrUvhLgt7iOr5QRojz1Kjc86MeIJsrxly4D5F1If76I5qvZtAT7 lVr8xUzXZDvVSsjffrKfIs91+HxZ2q06fZB8ITMYDoFn+Es5JArGeA7rFUA9fF7DICv8 YcztohczIx5ONbhcvFYJTUOJC6nf+2i4Q8x9p0z9cz+sDSLJ5eywOMIOzOGFsn6NbsTN 48U84JZp2Fq8Fc7vofW8TW9mKvKpmGwSY61kWK99/Of6Ut+t9rF6j+onm+YH4xaJ4cf/ FISivFgTbYDoNGJIkE28M7IWBebPZWy3aN1C2VJUf70OVXZbZSVseB/NUXPte0wT0Cpv 5/AQ== X-Gm-Message-State: AOAM532Y9wdm3qRWTf9o6dtz6O2XD55JED3xaMGWN/2YxiCF/8enyihG t3H/SV8cHW8dijiWwYWQrPI1BukrX+yBOHt/qSUqoKZg+IY= X-Google-Smtp-Source: ABdhPJxOOIghSgLwmUqKFEwDDUs9NiV/Bk5XiqterYU/yBxQIMBrd5p+fEM2n0CSaBv/7c+m2561Y2d990+yNj7ZVyM= X-Received: by 2002:a05:6808:2c3:: with SMTP id a3mr7453521oid.99.1622160128498; Thu, 27 May 2021 17:02:08 -0700 (PDT) MIME-Version: 1.0 References: <20210524124023.6372a3383876a1196cf81705@3dresearch.com> <20210526001153.e668d925df825e3486c5f7b9@3dresearch.com> In-Reply-To: <20210526001153.e668d925df825e3486c5f7b9@3dresearch.com> From: Kevin Oberman Date: Thu, 27 May 2021 17:01:52 -0700 Message-ID: Subject: Re: Updating /usr/ports To: Janos Dohanics Cc: FreeBSD Questions X-Rspamd-Queue-Id: 4FrlH573Gjz3JXG X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=PhElvXlz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of kob6558@gmail.com designates 2607:f8b0:4864:20::22e as permitted sender) smtp.mailfrom=kob6558@gmail.com X-Spamd-Result: default: False [-3.70 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[rkoberman@gmail.com,kob6558@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::22e:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[rkoberman@gmail.com,kob6558@gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::22e:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::22e:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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: Fri, 28 May 2021 00:02:12 -0000 On Tue, May 25, 2021 at 9:13 PM Janos Dohanics wrote: > 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.........120= 00.........13000.........14000.........15000.........16000.........17000...= ......18000.........19000.........20000.........21000.........22000........= .23000.........24000.........25000.........26000.........27000.........2800= 0.........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=3D" 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 > If you are trying to replace portsnap, I think the answer is net/gitup. This only requires a single command, "gitup ports", and you get your index updated along with updating all ports. I believe that the plan is to put gitup into the base system fairly soon. I have not looked at whether 14-current has gitup, yet. And, yes, it looks like the handbook needs some work as gitup is not yet even mentioned. Like portsnap, gitup is for people who want to maintain an up to date ports tree, but not good for developers. They do need to use git and either generate the index or fetch it. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683