For a long time, I've been noticing a recurrent terminology mistake in some pkgsrc-related mailing lists and bug trackers. The error is that some people use the "pkgsrc" word to refer to single packages inside the pkgsrc tree; e.g., they send a problem report with a summary line saying: "New pkgsrc for foo-1.0". This is incorrect and should read: "New package for foo-1.0", but we will discuss this below. (A confession: I did this mistake when submitting my first packages, too.)

So, which is the root of this confusion? I can't say for sure, but I can explain what happened to me. In the Linux world, almost all distributions use binary packages (those rpms or debs, to name a few), and users deal with them on a daily basis. However, all the documentation, as well as programs, use the term package to refer to these, as in "Proceed to install the bar-1.0.deb package". This is obviously not wrong, but is the terminology they chose and/or prefer to use.

Then, in the FreeBSD world, there is the ports tree, which is a collection of source packages, each of which is called a "port" (notice the distinction between plural and singular). OTOH, binary packages are called "packages", just as in Linux.

At last, when these people come to NetBSD, they find that: packages in the pkgsrc tree are not in binary form — thus the "package" term (the one from Linux) not being really appropriate —, and as pkgsrc is a singular name, you can't shorten it to get a correct name for a source package. Thus, they end up using the "pkgsrc" term to mention a single package.

Let's summarize this in a list of terms:

  • pkgsrc: The whole tree of packages and the infrastructure files, which usually lives in /usr/pkgsrc. There is no other thing known as pkgsrc.
  • Binary package: A .tgz file that contains a set of binary files ready to be installed using the pkg_add utility. We prefer to use these two terms to refer to this kind of files, as they result in an unambiguous concept.
  • Source package: A collection of files inside a specific subdirectory of the pkgsrc tree that holds a package. E.g., /usr/pkgsrc/meta-pkgs/gnome. Note that this term isn't much used; in fact, I don't remember seeing it anywhere, but I personally use it when I want to make the distinction clear.
  • Package: Usually refers to a source package, although, depending on the context, it can also be a binary one.

Go to posts index

Comments from the original Blogger-hosted post: