PKGPATH(7)

πŸ“¦ in nixpkgs unstable

🫢 pkgpath(7) 🫢

okay bestie, this is the Miscellaneous Information Manual page for pkgpath β€” and no, it is not the same thing as PKG_PATH. We’ll get there. πŸ’…

✨ NAME ✨

pkgpath β€” ports tree location for a package build

🌸 DESCRIPTION 🌸

Every single location in the ports tree is uniquely identified by a pkgpath, and that pkgpath encodes the directory, flavor, and subpackage info that lets a package build. This is not to be confused with PKG_PATH, bestie β€” that one is the list of URLs from which pkg_add(1) retrieves binary packages. Different vibe entirely. 🫢

Every pkgpath conforms to the pattern:

some/directory[,-sub][,flavor...]

The some/directory part refers to the directory part β€” the thing you find under the portstree, usually in /usr/ports (or /usr/ports/mystuff for port developers).

The ,-sub optional part refers to a specific subpackage from a multi-package port. It can be left blank for non multi-package ports, or to get the default subpackage (usually -main).

The ,flavor... optional part refers to the flavors or pseudo-flavors to use when building the package. If left blank, it refers to the default flavor. An explicit empty flavor can also be specified to make sure to get an empty flavor, even if it does not correspond to the default flavor. iykyk πŸŽ€

Note that -sub and flavor parts can be specified in any order, as all subpackages start with a dash. It is an error to ask for several subs at once, e.g. some/path,-sub1,-sub2, though it won’t always be flagged as a problem. rude, but true. πŸ’€

For instance:

  • misc/screen β€” a simple directory, default flavor, which happens to be empty.
  • misc/screen,static β€” same port, static flavor.
  • x11/kde/libs3 β€” a multi-package port with no subpackage nor flavor, refers to x11/kde/libs3,-main.
  • net/avahi β€” multi-package port with default flavor. Will actually build with FLAVOR="no_gui no_mono no_qt3 no_qt4 bootstrap" (all of which are pseudo-flavors), so that only the main package will build.
  • net/avahi,no_mono,-qt3 β€” build avahi with the "no_mono" pseudo-flavor, which will build the -main, -qt3, -qt4, -gui, -gtk, -gtk3, and -ui subpackages, and refer to the -qt3 subpackage.
  • net/avahi, β€” net/avahi with an explicit empty flavor, default subpackage (which happens to be -main).
  • net/avahi,,-qt4 β€” net/avahi with an explicit empty flavor, -qt4 subpackage.

The ports tree can iterate over lists of pkgpath through SUBDIR="pkgpath1 pkgpath2..." or through a full list through SUBDIRLIST=file.

dpb(1) also handles pkgpath lists for many options.

πŸ¦‹ NORMALISATION AND THE FULLPATH CONVENTION πŸ¦‹

When the ports tree handles dependencies, it passes pkgpath from BUILD_DEPENDS, LIB_DEPENDS, RUN_DEPENDS, and TEST_DEPENDS to the dependent port for normalisation purposes. That way, the pkgpath that gets recorded in the package doesn’t have any "default" flavor or "default" subpackage left: those are always resolved to the correct value. clean, normalized, iconic. ✨

Likewise, pseudo-flavors vanish from the pkgpath, since they only participate in the build process, but do not intervene in the built package.

As a result, such pkgpath are slightly different from the description above, as a flavor left blank is the empty flavor (and not the default flavor). This is the "fullpath convention". πŸŽ€

Tools such as dpb(1) display fullpath pkgpaths, and binary packages store full pkgpaths.

SUBDIR and SUBDIRLIST can be forced to follow the fullpath convention by explicitly passing FULLPATH=Yes to the corresponding make(1) invocations.

Most tools that process binary packages do so.

πŸ’– SEE ALSO πŸ’–

dpb(1), bsd.port.mk(5), library-specs(7), packages(7), packages-specs(7), ports(7)


xoxo, ur Unix bestie πŸ’– β€” this page is from Debian, dated March 27, 2017. slay. πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms