# pkg versus ports in 13; why are they not the same?



## mauricev (Dec 30, 2020)

I setup two VMs with the 20201224 build of 13. For one, I used pkg to install subversion and it installed 38 dependencies. For the other, I used ports, and it installed 124 dependencies.

Why the discrepancy? (Interestingly, for both, pkg info -dx reports 8 dependencies).  

subversion dependencies via pkg
apr-1.7.0.1.6.1_1
bash-5.1.4
bash-completion-2.11,2
ca_root_nss-3.58
db5-5.3.28_7
expat-2.2.10
gdbm-1.18.1_1
gettext-runtime-0.21
glib-2.66.4_1,1
gmp-6.2.1
gnupg-2.2.26
gnutls-3.6.15
indexinfo-0.3.1
libassuan-2.5.4
libedit-3.1.20191231,1
libffi-3.3_1
libgcrypt-1.8.7
libgpg-error-1.39
libiconv-1.16
libidn2-2.3.0_1
libksba-1.5.0
liblz4-1.9.3,1
libtasn1-4.16.0
libunistring-0.9.10_1
libxml2-2.9.10_2
nettle-3.6
npth-1.6
p11-kit-0.23.22
pcre-8.44
pinentry-1.1.0_7
pinentry-tty-1.1.0
python37-3.7.9_1
readline-8.0.4
serf-1.3.9_5
sqlite3-3.34.0,1
tpm-emulator-0.7.4_2
trousers-0.3.14_3
utf8proc-2.5.0

subversion dependencies via ports
apr-1.7.0.1.6.1_1
autoconf-2.69_3
autoconf-wrapper-20131203
automake-1.16.3
bash-5.1.4
bash-completion-2.11,2
bison-3.6.4,1
boost-jam-1.72.0
boost-libs-1.72.0_3
ca_root_nss-3.58
db5-5.3.28_7
dialog4ports-0.1.6
docbook-1.5
docbook-sgml-4.5_1
docbook-xml-5.0_3
docbook-xsl-1.79.1_1,1
expat-2.2.10
gdbm-1.18.1_1
gettext-runtime-0.21
gettext-tools-0.21
glib-2.66.4_1,1
gmake-4.3_2
gmp-6.2.1
gnupg-2.2.26
gnutls-3.6.15
gtk-doc-1.29_1
help2man-1.47.16
highlight-3.43_8,3
icu-68.2,1
indexinfo-0.3.1
iso8879-1986_3
itstool-2.0.6
libassuan-2.5.4
libedit-3.1.20191231,1
libffi-3.3_1
libgcrypt-1.8.7
libgpg-error-1.39
libiconv-1.16
libidn2-2.3.0_1
libksba-1.5.0
liblz4-1.9.3,1
libtasn1-4.16.0
libtextstyle-0.21
libunistring-0.9.10_1
libxml2-2.9.10_2
libxslt-1.1.34_1
lua52-5.2.4
m4-1.4.18_1,1
meson-0.56.0
nettle-3.6
ninja-1.10.2,2
npth-1.6
p11-kit-0.23.22
p5-Locale-gettext-1.07
p5-Locale-libintl-1.32
p5-Text-Unidecode-1.30
p5-Unicode-EastAsianWidth-12.0
pcre-8.44
perl5-5.32.0_1
pinentry-1.1.0_7
pinentry-tty-1.1.0
pkgconf-1.7.3,1
py37-libxml2-2.9.10_2
py37-setuptools-44.0.0
python37-3.7.9_1
readline-8.0.4
scons-py37-3.1.2
sdocbook-xml-1.1_2,2
serf-1.3.9_5
sqlite3-3.34.0,1
texinfo-6.7_4,1
utf8proc-2.5.0
xmlcatmgr-2.2_2
xmlcharent-0.3_2


----------



## shkhln (Dec 30, 2020)

You can't be serious… Compare these two lists, read package descriptions. See a pattern yet?

(I can answer the question directly, of course, but that would be an act of extreme hand-holding.)


----------



## mauricev (Dec 30, 2020)

OK, now I see it. They're build tools. FreeBSD comes without any build tools. But still it's suspicious that it needs so many such tools for just installing just this one program and its dependencies unless there is an all build tool dependency built into the make command. For example, why is gtk-doc being included? Or texinfo? Or help2man? These don't seem to be required by any other package.


----------



## Jose (Dec 30, 2020)

"A FreeBSD _port_ is a collection of files designed to automate the process of compiling an application from source code...When      feasible, these applications are made available for download as pre-compiled _packages_."









						Chapter 4. Installing Applications: Packages and Ports
					

FreeBSD provides two complementary technologies for installing third-party software: the FreeBSD Ports Collection, for installing from source, and packages, for installing from pre-built binaries




					www.freebsd.org


----------



## mark_j (Dec 30, 2020)

mauricev said:


> OK, now I see it. They're build tools. FreeBSD comes without any build tools. But still it's suspicious that it needs so many such tools for just installing just this one program and its dependencies unless there is an all build tool dependency built into the make command. For example, why is gtk-doc being included? Or texinfo? Or help2man? These don't seem to be required by any other package.


You need to complain to the upstream nongs (aka idiots) that have built in so many very useless dependencies into their software.  But then again, that's the way of open source now: bloat like only microsoft once dreamt of.
I blame it partially on gpl licensing (a majority part in fact, but I digress) and on using object oriented languages. /end rant


----------



## Jose (Dec 30, 2020)

Much as I'm not a fan of bloated dependencies, I think what's going on here is that the package doesn't need the build-time dependencies because it's already built. That's what a package is: a built port. This is for Gentoo, but it's a decent description of the difference between build and runtime dependencies and applies to ports as well:





__





						Dependencies – Gentoo Development Guide
					

The Gentoo Devmanual is a technical manual which covers topics such as writing ebuilds and eclasses, and policies that developers should be abiding by.




					devmanual.gentoo.org


----------



## mark_j (Dec 30, 2020)

Yes of course. That's why using the package system is preferable for those who are:
1. New to FreeBSD
2. Have low power machines.
3. Have little time.
4. Have no special requirements for a port/package that requires custom input.
5. All of the above.


----------



## Alexander88207 (Dec 30, 2020)

mauricev said:


> I used pkg to install subversion and it installed 38 dependencies.



I don't know what you have in mind but what about using the existing `svnlite` that comes with FreeBSD?


----------

