Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Ports INDEX File ===== ===== Introduction ===== Index files contain port/package metadata, providing fast lookup of information by other tools. They are located in ''%%/usr/ports%%'' (''%%${INDEXDIR}%%'', by default), named ''%%INDEX-X%%'' (''%%${INDEXFILE}%%''), where X is the systems %%FreeBSD%% major version (Example: ''%%INDEX-13%%'', ''%%INDEX-14%%'') An index file can either be generated with the ''%%make index%%'' command, or, a pre-built and compressed version downloaded with the ''%%make fetchindex%%'' command. Each line of an index file is one entry keyed by ''%%PKGNAME%%'', containing port metadata output by the ''%%make describe%%'' command. As of 2022-05 make describe output contains: <code> distribution-name|port-path|installation-prefix|comment| description-file|maintainer|categories|extract-depends| patch-depends|fetch-depends|build-depends|run-depends|www site </code> ===== Tools that read INDEX ===== ^ Tool ^ Description ^ Comments ^ | portsnap | Compares INDEX to .portsnap.INDEX for 'update' command | [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=159946|Bug 159946]](([[/ColinPercival|ColinPercival]] has explained that extra fields must be stripped for <9, maybe he can get patches in before release)) | | make search | Queries INDEX for ''%%attribute=value%%'' lookup | | | pkg version | Used by pkg ''%%version%%'' (pkg-version) and ''%%rquery%%'' (pkg-rquery) commands | Appending new fields not a problem ((Only reads as far as it needs to)) | ===== Tools that use make describe ===== ^ Tool ^ Description ^ Comments ^ | make index | Generates INDEX | | ===== Tools that generate INDEX ===== ^ Tool ^ Description ^ Comments ^ | [[https://www.freshports.org/ports-mgmt/p5-FreeBSD-Portindex/|portindex]] | Perl INDEX generator | [[http://www.infracaninophile.co.uk/portindex/|WWW]] [[https://github.com/infracaninophile/portindex|GitHub]] | | [[https://www.freshports.org/print/makeindex|makeindex]] | %%TeX%% makeindex | | ===== Notes ===== * This format has been set in stone due to certain tools that try to parse it for information, and until a complete list of these tools is found we can't do much about sanitising the format. ---- {{tag>Ports}} ports/index.txt Last modified: 2022/05/13 03:55by KubilayKocak