Why i need extract not one needed port, but full catalog never needed ports?

Polytropon freebsd at edvax.de
Thu Sep 5 16:27:14 UTC 2019

On Thu, 05 Sep 2019 17:43:46 +0300, Виктор Кутенков via freebsd-questions wrote:
> I like work with ports. But why i need dowload and extract ~1Gb empty folders?

The ports collection that you install locally is a "collection of
recipes on how to build software", i. e., the directories aren't
empty, they just contain very few (and small) files that describe
build procedures, dependencies, and other things. This framework
can then be used with regular build tools already provided by
the system, like "make search", "make install", or "make deinstall".

> Is it posible to use next algoritm, for example:
> Do not make portsnap fetch extract
> immediately after installing the system make:
> # /usr/ports/x11/xorg make install clean
> 1. freebsd check the directory /usr/ports/x11/xorg
> >> it is empty
> 2. freebsd check the internet for search "/usr/ports/x11/xorg"
> >> it is found "data"
> 3. freebsd dowload and compile data from internet.
> Why it must make portsnap extract ALL never needed empty folders to
> system before?

This is not possible because it would introduce a chain of further
"find & download" tasks - for example, X has certain dependencies,
those also have dependencies, and they need to be build or present
_before_ building X is possible.

The ports tree doesn't consume much disk space.


If you want to avoid ports, you can always use pkg: "pkg install"
will not require the ports tree to be installed; it will resolve
the dependencies required by a specific port, and download and
install them. No further disk space is needed for building, as
no building happens. Only a small database is maintained by pkg

> Is it posible make in future - search and extract from internet
> only one needed port? Like # pkg install xorg

As I mentioned, dependencies have to be considered, and the ports
tree contains that information. Furthermore, some ports are just
"metaports", so they entirely depend on other ports.

> This thought haunts from the very beginning of acquaintance with bsd.
> Sorry for my illiteracy in IT

The current state of the ports collection is a consensus of space
vs. usability. Having only the "recipes" stored locally, and obtaining
the actual sources (!) only when required is a decision made long time
ago. (NB: For closed source software, "sources" refers to the actual
binaries which a "make install" call would download and install.)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list