# net/samba411 says it requires python27 but doesn't install it



## jerry507 (May 4, 2020)

The title is fairly self explanatory, but let me walk through what I am looking at. I'm back to FreeBSD after about 15 years and much has changed, but ports are still cool so I build them. I was looking to build net/samba411 and was working through dependencies prior to install. When I run `jerry@spock:/usr/ports/net/samba411 # make all-depends-list` I get this:


```
/usr/ports/ports-mgmt/pkg
/usr/ports/devel/jansson
/usr/ports/devel/pkgconf
/usr/ports/devel/kyua
/usr/ports/devel/atf
/usr/ports/devel/lutok
/usr/ports/lang/lua52
/usr/ports/devel/libedit
/usr/ports/databases/sqlite3
/usr/ports/devel/readline
/usr/ports/print/indexinfo
/usr/ports/devel/p5-Parse-Yapp
/usr/ports/lang/perl5.30
/usr/ports/archivers/libarchive
/usr/ports/converters/libiconv
/usr/ports/textproc/expat2
/usr/ports/archivers/liblz4
/usr/ports/devel/gmake
/usr/ports/devel/gettext-runtime
/usr/ports/archivers/lzo2
/usr/ports/sysutils/cmocka
/usr/ports/devel/cmake
/usr/ports/textproc/py-sphinx
/usr/ports/devel/py-Jinja2
/usr/ports/devel/py-setuptools
/usr/ports/lang/python37
/usr/ports/devel/gettext-tools
/usr/ports/devel/libtextstyle
/usr/ports/devel/libffi
/usr/ports/misc/dejagnu
/usr/ports/lang/expect
/usr/ports/devel/autoconf
/usr/ports/devel/m4
/usr/ports/print/texinfo
/usr/ports/misc/help2man
/usr/ports/devel/p5-Locale-gettext
/usr/ports/devel/p5-Locale-libintl
/usr/ports/converters/p5-Text-Unidecode
/usr/ports/textproc/p5-Unicode-EastAsianWidth
/usr/ports/devel/autoconf-wrapper
/usr/ports/devel/automake
/usr/ports/lang/tcl86
/usr/ports/textproc/py-MarkupSafe
/usr/ports/devel/py-babel
/usr/ports/devel/py-pytz
/usr/ports/textproc/py-docutils
/usr/ports/devel/py-six
/usr/ports/devel/py-pytest
/usr/ports/devel/py-setuptools_scm
/usr/ports/textproc/py-toml
/usr/ports/devel/py-pip
/usr/ports/textproc/py-pypa-docs-theme
/usr/ports/textproc/py-python-docs-theme
/usr/ports/devel/py-freezegun
/usr/ports/devel/py-dateutil
/usr/ports/devel/py-pytest-cov
/usr/ports/devel/py-coverage
/usr/ports/devel/py-hypothesis
/usr/ports/devel/py-attrs
/usr/ports/devel/py-pympler
/usr/ports/devel/py-zope.interface
/usr/ports/devel/py-sortedcontainers
/usr/ports/databases/py-sqlite3
/usr/ports/devel/py-mock
/usr/ports/devel/py-invoke
/usr/ports/devel/py-semantic_version
/usr/ports/www/py-django111
/usr/ports/devel/py-wheel
/usr/ports/devel/py-twine
/usr/ports/security/py-keyring
/usr/ports/devel/py-entrypoints
/usr/ports/security/py-keyrings.alt
/usr/ports/security/py-pycrypto
/usr/ports/math/gmp
/usr/ports/devel/py-fs
/usr/ports/security/py-SecretStorage
/usr/ports/security/py-cryptography
/usr/ports/devel/py-cffi
/usr/ports/devel/py-pycparser
/usr/ports/devel/py-asn1crypto
/usr/ports/security/py-cryptography-vectors
/usr/ports/devel/py-iso8601
/usr/ports/devel/py-pretend
/usr/ports/devel/py-dbus
/usr/ports/devel/dbus-glib
/usr/ports/devel/dbus
/usr/ports/textproc/minixmlto
/usr/ports/textproc/docbook-xsl
/usr/ports/textproc/xmlcatmgr
/usr/ports/textproc/docbook
/usr/ports/textproc/docbook-sgml
/usr/ports/textproc/iso8879
/usr/ports/textproc/docbook-xml
/usr/ports/textproc/xmlcharent
/usr/ports/textproc/sdocbook-xml
/usr/ports/textproc/libxslt
/usr/ports/security/libgcrypt
/usr/ports/security/libgpg-error
/usr/ports/textproc/libxml2
/usr/ports/textproc/html2text
/usr/ports/x11/libICE
/usr/ports/x11/xorgproto
/usr/ports/devel/xorg-macros
/usr/ports/x11/xtrans
/usr/ports/x11/libSM
/usr/ports/x11/libX11
/usr/ports/x11/libXau
/usr/ports/x11/libxcb
/usr/ports/devel/check
/usr/ports/devel/libtool
/usr/ports/x11/xcb-proto
/usr/ports/devel/libpthread-stubs
/usr/ports/x11/libXdmcp
/usr/ports/devel/glib20
/usr/ports/devel/pcre
/usr/ports/devel/pydbus-common
/usr/ports/sysutils/py-pkginfo
/usr/ports/devel/py-readme_renderer
/usr/ports/www/py-bleach
/usr/ports/converters/py-webencodings
/usr/ports/textproc/py-pygments
/usr/ports/www/py-requests
/usr/ports/security/py-certifi
/usr/ports/textproc/py-chardet
/usr/ports/devel/py-pytest-runner
/usr/ports/dns/py-idna
/usr/ports/net/py-urllib3
/usr/ports/net/py-pysocks
/usr/ports/security/py-openssl
/usr/ports/devel/py-flaky
/usr/ports/devel/py-nose
/usr/ports/devel/py-pytest-xdist
/usr/ports/sysutils/py-execnet
/usr/ports/devel/py-apipkg
/usr/ports/devel/py-pytest-forked
/usr/ports/sysutils/py-filelock
/usr/ports/devel/py-genty
/usr/ports/security/ca_root_nss
/usr/ports/www/py-tornado
/usr/ports/devel/py-pytest-mock
/usr/ports/www/py-requests-toolbelt
/usr/ports/misc/py-tqdm
/usr/ports/devel/py-importlib-metadata
/usr/ports/devel/py-zipp
/usr/ports/devel/py-more-itertools
/usr/ports/devel/py-pytest-capturelog
/usr/ports/devel/py-py
/usr/ports/devel/py-pytest-rerunfailures
/usr/ports/devel/py-pytest-timeout
/usr/ports/misc/py-pexpect
/usr/ports/sysutils/py-ptyprocess
/usr/ports/devel/py-scripttest
/usr/ports/devel/py-tox
/usr/ports/devel/py-pluggy
/usr/ports/devel/py-virtualenv
/usr/ports/textproc/py-sphinx_rtd_theme
/usr/ports/textproc/py-towncrier
/usr/ports/devel/py-click
/usr/ports/devel/py-incremental
/usr/ports/devel/py-yaml
/usr/ports/devel/bzr
/usr/ports/lang/cython
/usr/ports/lang/python27
/usr/ports/security/py-paramiko
/usr/ports/security/py-bcrypt
/usr/ports/devel/py-pyasn1
/usr/ports/security/py-pynacl
/usr/ports/security/libsodium
/usr/ports/devel/py-testtools
/usr/ports/devel/py-pbr
/usr/ports/devel/py-extras
/usr/ports/devel/py-python-mimeparse
/usr/ports/devel/py-traceback2
/usr/ports/devel/py-linecache2
/usr/ports/devel/py-unittest2
/usr/ports/devel/git
/usr/ports/ftp/curl
/usr/ports/www/libnghttp2
/usr/ports/lang/p5-Error
/usr/ports/textproc/xmlto
/usr/ports/shells/bash
/usr/ports/devel/bison
/usr/ports/misc/getopt
/usr/ports/print/libpaper
/usr/ports/www/w3m
/usr/ports/devel/boehm-gc
/usr/ports/devel/libatomic_ops
/usr/ports/devel/libltdl
/usr/ports/textproc/asciidoc
/usr/ports/devel/cvsps
/usr/ports/www/p5-CGI
/usr/ports/www/p5-HTML-Parser
/usr/ports/www/p5-HTML-Tagset
/usr/ports/devel/p5-Test-Deep
/usr/ports/devel/p5-Test-NoWarnings
/usr/ports/devel/p5-Test-Warn
/usr/ports/devel/p5-Sub-Uplevel
/usr/ports/security/p5-Authen-SASL
/usr/ports/security/p5-Digest-HMAC
/usr/ports/security/p5-GSSAPI
/usr/ports/security/p5-IO-Socket-SSL
/usr/ports/security/p5-Net-SSLeay
/usr/ports/devel/p5-Test-Exception
/usr/ports/www/p5-Mozilla-CA
/usr/ports/net/p5-IO-Socket-INET6
/usr/ports/net/p5-Socket6
/usr/ports/devel/p5-Term-ReadKey
/usr/ports/devel/p5-subversion
/usr/ports/devel/subversion
/usr/ports/security/gnupg
/usr/ports/security/libassuan
/usr/ports/security/libksba
/usr/ports/devel/npth
/usr/ports/security/gnutls
/usr/ports/security/nettle
/usr/ports/security/libtasn1
/usr/ports/devel/libunistring
/usr/ports/dns/libidn2
/usr/ports/security/p11-kit
/usr/ports/security/trousers
/usr/ports/emulators/tpm-emulator
/usr/ports/devel/ninja
/usr/ports/security/pinentry
/usr/ports/security/pinentry-tty
/usr/ports/devel/apr1
/usr/ports/databases/gdbm
/usr/ports/databases/db5
/usr/ports/textproc/utf8proc
/usr/ports/www/serf
/usr/ports/devel/scons
/usr/ports/devel/mercurial
/usr/ports/devel/py-atomicwrites
/usr/ports/devel/py-wcwidth
/usr/ports/textproc/py-sphinxcontrib-websupport
/usr/ports/textproc/py-alabaster
/usr/ports/textproc/py-snowballstemmer
/usr/ports/textproc/py-pystemmer
/usr/ports/graphics/py-imagesize
/usr/ports/www/py-html5lib
/usr/ports/devel/py-simplejson
/usr/ports/devel/jsoncpp
/usr/ports/devel/meson
/usr/ports/devel/libuv
/usr/ports/security/rhash
/usr/ports/devel/talloc
/usr/ports/devel/tevent
/usr/ports/databases/tdb
/usr/ports/devel/popt
/usr/ports/devel/libinotify
/usr/ports/sysutils/libsunacl
/usr/ports/net/mDNSResponder
/usr/ports/devel/gamin
/usr/ports/net/tshark
/usr/ports/archivers/snappy
/usr/ports/net/libmaxminddb
/usr/ports/net-mgmt/libsmi
```

I was surprised to see this in the output:


```
/usr/ports/lang/python37
/usr/ports/textproc/py-python-docs-theme
/usr/ports/lang/python27
/usr/ports/devel/py-python-mimeparse
```

With Python 2.7 going EOL at the end of 2020 I was surprised the latest version of Samba was using it. I configured the port to the bare minimum (all off, no zeroconf and GSSAPI_builtin  and yet it was still there. Resigned I built it anyway. Then to really rub it in to myself I ran `jerry@spock:/usr/ports/net/samba411 # portmaster -L` and get this output:


```
===>>> Root ports (No dependencies, not depended on)
===>>> cmocka-1.1.5
===>>> dialog4ports-0.1.6
===>>> gsfonts-8.11_8
===>>> iso-schematron-xslt-20130313_1
===>>> jbigkit-2.1_1
===>>> libdaemon-0.14_1
===>>> libepoll-shim-0.0.20200223
===>>> libpthread-stubs-0.4
===>>> links1-1.04,1
===>>> nasm-2.14.02,1
===>>> pkg-1.14.4
===>>> pkgconf-1.6.3,1
===>>> portmaster-3.19_25
===>>> tcl86-8.6.10
===>>> unzip-6.0_8
===>>> vim-console-8.2.0491_1
===>>> 16 root ports

===>>> Trunk ports (No dependencies, are depended on)
===>>> autoconf-wrapper-20131203
===>>> ca_root_nss-3.52
===>>> expat-2.2.8
===>>> freetype2-2.10.1
===>>> fusefs-libs-2.9.9_1
===>>> html2text-1.3.2a
===>>> indexinfo-0.3.1
===>>> jansson-2.12
===>>> jsoncpp-1.9.2
===>>> libiconv-1.14_11
===>>> libinotify-20180201_2
===>>> liblz4-1.9.2_1,1
===>>> libnghttp2-1.40.0
===>>> libpaper-1.1.24.4
===>>> libsunacl-1.0.1
===>>> libublio-20070103_2
===>>> libuv-1.37.0
===>>> libxml2-2.9.10
===>>> lzo2-2.10_1
===>>> mDNSResponder-1096.0.2
===>>> pcre-8.43_2
===>>> perl5-5.30.2
===>>> png-1.6.37
===>>> uchardet-0.0.7
===>>> xmlcatmgr-2.2_2
===>>> 25 trunk ports

===>>> Branch ports (Have dependencies, are depended on)
===>>> autoconf-2.69_3
===>>> curl-7.70.0
===>>> dbus-1.12.16
===>>> docbook-1.5
===>>> docbook-sgml-4.5_1
===>>> docbook-xml-5.0_3
===>>> docbook-xsl-1.79.1_1,1
===>>> gamin-0.1.10_10
===>>> gettext-runtime-0.20.2
===>>> glib-2.56.3_7,1
===>>> gmp-6.2.0
===>>> gnutls-3.6.13
===>>> iso8879-1986_3
===>>> libarchive-3.4.2,1
===>>> libffi-3.2.1_3
===>>> libgcrypt-1.8.5
===>>> libgpg-error-1.37
===>>> libidn2-2.3.0_1
===>>> libtasn1-4.16.0
===>>> libtextstyle-0.20.2
===>>> libunistring-0.9.10_1
===>>> libxslt-1.1.34_1
===>>> m4-1.4.18_1,1
===>>> nettle-3.5.1_1
===>>> ninja-1.10.0,2
===>>> p11-kit-0.23.20
===>>> p5-Locale-gettext-1.07
===>>> p5-Locale-libintl-1.31
===>>> p5-Text-Unidecode-1.30
===>>> p5-Unicode-EastAsianWidth-12.0
===>>> p5-XML-Parser-2.44
===>>> popt-1.16_2
===>>> psutils-1.17_5
===>>> py37-Babel-2.8.0
===>>> py37-Jinja2-2.10.1
===>>> py37-MarkupSafe-1.1.1
===>>> py37-alabaster-0.7.6
===>>> py37-asn1crypto-1.3.0
===>>> py37-certifi-2020.4.5.1
===>>> py37-cffi-1.14.0
===>>> py37-chardet-3.0.4_3
===>>> py37-cryptography-2.6.1
===>>> py37-docutils-0.15.2
===>>> py37-idna-2.8
===>>> py37-imagesize-1.1.0
===>>> py37-iso8601-0.1.12
===>>> py37-openssl-19.0.0
===>>> py37-pycparser-2.19
===>>> py37-pygments-2.5.2
===>>> py37-pysocks-1.7.1
===>>> py37-pystemmer-2.0.0.1
===>>> py37-pytz-2019.3,1
===>>> py37-requests-2.22.0
===>>> py37-setuptools-44.0.0
===>>> py37-six-1.14.0
===>>> py37-snowballstemmer-1.2.1
===>>> py37-sphinx_rtd_theme-0.4.3
===>>> py37-sphinxcontrib-websupport-1.1.2
===>>> py37-urllib3-1.25.7,1
===>>> python37-3.7.7
===>>> readline-8.0.4
===>>> rhash-1.3.9
===>>> sdocbook-xml-1.1_2,2
===>>> talloc-2.3.0
===>>> tdb-1.4.2,1
===>>> tevent-0.10.1
===>>> tpm-emulator-0.7.4_2
===>>> trousers-0.3.14_2
===>>> xmlcharent-0.3_2
===>>> 69 branch ports

===>>> Leaf ports (Have dependencies, not depended on)
===>>> automake-1.16.2
===>>> bison-3.5.4,1
===>>> check-0.14.0
===>>> cmake-3.17.1
===>>> dbus-glib-0.110
===>>> docbook-xsl-ns-1.78.1_4
===>>> fontconfig-2.13.92_1,1
===>>> fusefs-exfat-1.3.0
===>>> gdbm-1.18.1_1
===>>> gettext-tools-0.20.2
===>>> gmake-4.2.1_3
===>>> gperf-3.1
===>>> groff-1.22.4_3
===>>> help2man-1.47.15
===>>> intltool-0.51.0_1
===>>> jbig2dec-0.18
===>>> libidn-1.35
===>>> libtool-2.4.6_1
===>>> meson-0.54.0
===>>> minixmlto-0.0.2_1
===>>> p5-Parse-Yapp-1.05_2
===>>> py37-cython-0.29.15
===>>> py37-sphinx-1.6.5_2,1
===>>> rsync-3.1.3_1
===>>> samba411-4.11.8
===>>> texinfo-6.7_2,1
===>>> xhtml-1.0.20020801_5
===>>> 27 leaf ports

===>>> 137 total installed ports
        ===>>> There are no new versions available
```

Unless I'm blind Python 2.7 is not installed. What is going on? I'm confused and would like to understand the nuance of what is happening here. Thank you in advance!


----------



## jerry507 (May 9, 2020)

Any thoughts on this? I know it's a relatively esoteric question that is ultimately not hurting anything because Python 2.7 is not actually installed, but I am hoping someone can enlighten me. Thanks!


----------



## trev (May 9, 2020)

Perhaps one of samba's dependencies requires 2.7?


----------



## richardtoohey2 (May 9, 2020)

You did ask for _any_ thoughts, so here goes!

Something to do with when Python ports were flavoured?  https://svnweb.freebsd.org/ports/head/net/samba411/Makefile?view=log

If you search on that page for Python there's some stuff there - wondering if that's related?

Anything in your /etc/make.conf (if you've got one) that does anything with Python?

Maybe all-depends-list does its best based on the make files but what actually gets built depends on something else?


----------



## jerry507 (May 9, 2020)

I didn't expect an easy answer so I appreciate the feedback.

From what I can tell from `make all-depends-list` the python 2.7 dependency is coming from mimeparser. From this page mimeparser is a dependency for the developer test suite. But after looking at `make config` I don't have the DEVELOPER line checked.

I saw this https://forums.freebsd.org/threads/...es-pulled-in-when-installing-a-package.74940/ and it has some similarity but I'm not sure the exact mechanism. So I checked that /usr/ports/Mk/bsd.default-versions.mk  had the default versions set correctly and it did:


```
PYTHON_DEFAULT?=        3.7
PYTHON2_DEFAULT?=       2.7
PYTHON3_DEFAULT?=       3.7
```

and for giggles, based on looking at the ports log I set USE_PYTHON=3.7 in my /etc/make.conf. It still shows mimeparser/python 2.7 as a dependency 

The only other thing in my /etc/make.conf file is WITHOUT_X11=yes.

Since Python 2.7 doesn't actually seem to get built, is this just a bug of some form in the dependency tracking? Since I know so little about how the ports tree functions behind the scenes I don't want to assume without asking.


----------

