Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2019 18:27:10 +0200
From:      Polytropon <freebsd@edvax.de>
To:        =?UTF-8?B?0JLQuNC60YLQvtGAINCa0YPRgtC10L3QutC+0LI=?= <harpy@mail.ru>
Cc:        =?UTF-8?B?0JLQuNC60YLQvtGAINCa0YPRgtC10L3QutC+0LI=?= via freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Why i need extract not one needed port, but full catalog never needed ports?
Message-ID:  <20190905182710.9675eb8f.freebsd@edvax.de>
In-Reply-To: <1567694626.722400563@f512.i.mail.ru>
References:  <1567694626.722400563@f512.i.mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Sidenote:

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
itself.




> 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.)




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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190905182710.9675eb8f.freebsd>