# Strange portmaster upgrade behaviour



## ethoms (May 4, 2015)

I am upgrading several jails ports via `portmaster -Rad`, and I get strange upgrade behaviour. Below is the relevant output:


```
===>>> The following actions will be taken if you choose to proceed:
  Upgrade py34-pygments-1.6_2 to py27-pygments-2.0.2
  Install devel/py-setuptools27
  Upgrade py34-pytz-2014.7,1 to py27-pytz-2014.10,1
  Upgrade py34-setuptools34-5.5.1 to py34-setuptools34-5.5.1_1
  Upgrade python34-3.4.2_1 to python34-3.4.3_1
  Upgrade bash-4.3.30 to bash-4.3.33
  Install devel/bison
  Install devel/m4
  Install lang/perl5.18
  Upgrade gmake-4.1 to gmake-4.1_1
  Upgrade nginx-1.6.2,2 to nginx-1.8.0,2
  Upgrade postgresql93-client-9.3.5 to postgresql93-client-9.3.6_1
  Upgrade py34-pip-1.5.6 to py27-pip-6.1.1

===>>> Proceed? y/n [y]
```

This is what my `pkg info` looked like before the upgrade request:


```
# pkg info
bash-4.3.30  The GNU Project's Bourne Again SHell
bsdadminscripts-6.1.1_8  Collection of administration scripts
cpdup-1.17_2  Comprehensive filesystem mirroring and backup program
dialog4ports-0.1.5_2  Console Interface to configure ports
expat-2.1.0_2  XML 1.0 parser written in C
gettext-runtime-0.19.4  GNU gettext runtime libraries and programs
gettext-tools-0.19.4  GNU gettext development and translation tools
gmake-4.1  GNU version of 'make' utility
indexinfo-0.2.3  Utility to regenerate the GNU info page index
libffi-3.2.1  Foreign Function Interface
libiconv-1.14_8  Character set conversion library
libxml2-2.9.2_2  XML parser library for GNOME
nginx-1.6.2,2  Robust and small WWW server
pcre-8.35_2  Perl Compatible Regular Expressions library
pkg-1.5.1  Package manager
pkgconf-0.9.10  Utility to help to configure compiler and linker flags
portmaster-3.17.7  Manage your ports without external databases or languages
postgresql93-client-9.3.5  PostgreSQL database (client)
py27-meld3-0.6.8_1  HTML/XML templating system for Python
py27-supervisor-3.0_1,1  System to monitor and control a number of processes on UNIX-like OS
py34-Babel-1.3_2  Collection of tools for internationalizing Python applications
py34-Jinja2-2.7.3  Fast and easy to use stand-alone template engine
py34-MarkupSafe-0.23  Implements a XML/HTML/XHTML Markup safe string for Python
py34-docutils-0.12  Python Documentation Utilities
py34-pip-1.5.6  Tool for installing and managing Python packages
py34-pygments-1.6_2  Syntax highlighter written in Python
py34-pytz-2014.7,1  World Timezone Definitions for Python
py34-setuptools34-5.5.1  Python packages installer
py34-sphinx-1.2.3  Python documentation generator
python2-2_3  The "meta-port" for version 2 of the Python interpreter
python27-2.7.9_1  Interpreted object-oriented programming language
python34-3.4.2_1  Interpreted object-oriented programming language
```


----------



## DutchDaemon (May 4, 2015)

Do you have anything set in your /etc/make.conf about DEFAULT_VERSIONS? It seems like everything Python-related wants to revert to the current default version, 2.7. See /usr/ports/Mk/bsd.default-versions.mk.


----------



## ethoms (May 4, 2015)

Don't have an /etc/make.conf file.


----------



## DutchDaemon (May 4, 2015)

Then it looks like you need one if you're running a non-default version of Python. Using this in /etc/make.conf should produce a better outcome:
	
	



```
DEFAULT_VERSIONS=  python=3.4 python3=3.4
```
If you have no more need of Python 2.x, I advise strongly to remove all ports (including the meta-port) referring to it, or else you'll have to jump through hoops to run major versions side-by-side.


----------



## ethoms (May 4, 2015)

Thanks for the tip about python version in /etc/make.conf. Actually I'm not bothered about the python version, it's required for django, which I install via pip. It's just I don't understand how it thinks python3 -> python2 is an update. Since `make install` chose the version of python dependencies in the first place. It seems something is broken to me.


----------



## ethoms (May 4, 2015)

OK, so after adding DEFAULT_VERSIONS as DutchDaemon suggested, it seems to work better:

This is my upgrade path now:

```
===>>> The following actions will be taken if you choose to proceed:
  Upgrade pkgconf-0.9.7 to pkgconf-0.9.10
  Upgrade indexinfo-0.2 to indexinfo-0.2.3
  Upgrade pcre-8.35_1 to pcre-8.35_2
  Upgrade libffi-3.0.13_3 to libffi-3.2.1
  Upgrade py27-setuptools27-5.5.1 to py27-setuptools27-5.5.1_1
  Upgrade python27-2.7.8_6 to python27-2.7.9_1
  Upgrade py34-pygments-1.6_2 to py34-pygments-2.0.2
  Upgrade py34-setuptools34-5.5.1 to py34-setuptools34-5.5.1_1
  Upgrade python34-3.4.2_1 to python34-3.4.3_1
  Upgrade py34-pytz-2014.7,1 to py34-pytz-2014.10,1
  Upgrade bash-4.3.30 to bash-4.3.33
  Install converters/libiconv
  Install devel/bison
  Install devel/m4
  Install lang/perl5.18
  Upgrade gmake-4.1 to gmake-4.1_1
  Upgrade nginx-1.6.2,2 to nginx-1.8.0,2
  Upgrade postgresql93-client-9.3.5 to postgresql93-client-9.3.6_1
  Upgrade py34-pip-1.5.6 to py34-pip-6.1.1

===>>> Proceed? y/n [y]
```


----------

