[HEADS UP] Planned deprecation of portsnap

Matthew Seaman matthew at FreeBSD.org
Sun Aug 9 15:43:35 UTC 2020


On 09/08/2020 07:03, Stefan Ehmann wrote:
> I usually run `pkg version` to see what packages have changed.
> 
> Previously, that was a more or less instant operation, now it takes over 100
> seconds. The problem is that /usr/ports/INDEX-12 is missing.

Yes.  For historical reason, the order of precedence for the source of
information about available packages that pkg(8) uses is:

   * INDEX file
   * A checked-out copy of /usr/ports
   * The pkg repository catalogue

In my humble opinion, it's the third of those options that is actually
the best, both in terms of speed and accuracy.  You can force pkg(8) to
use the repository catalogue by either of:

   * Use the '-R' command line flag: `pkg version -vRL=`
   * Don't have an installed copy of /usr/ports -- either use the system
     pre-compiled packages or set up your own repo with poudriere(8)

Second best is to use the ports INDEX: this is pretty quick, but has a
few niggles about accuracy.  For instance: I don't know if the INDEX
handles package flavours properly yet.  You can obtain a copy of the
INDEX by:

   * cd /usr/ports ; make fetchindex   (downloads a pre-built index)
   * cd /usr/ports ; make index        (builds an index locally)

Building your own index does take a non-trivial amount of time and CPU
resources, but it does mean the INDEX reflects local customizations and
options settings.

Least useful is the situation where you have an installed ports tree but
no INDEX file.  In this case, pkg(8) will run make(1) to extract the
needed dependency information, which, as you have already discovered,
takes approximately forever.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20200809/5afaee5b/attachment.sig>


More information about the freebsd-ports mailing list