# pkg upgrade package to intermediate version



## vadimk (Oct 23, 2021)

Hello,

Is it possible to execute a set of intermediate upgrades for the specific package with pkg utility? For example gitlab-ce version 13.x must be updated first to 13.12.12 version and only then to 14.1.6. I didn't find any possibility to specify package version. It always takes latest.

Thanks


----------



## zirias@ (Oct 23, 2021)

It always takes what's in the repository you're using. This can be either "latest" or "quarterly". For binary packages, that's all the options you have.

I kind of sense an XY-problem here, so, would you mind to explain why you think "intermediate upgrade steps" would solve your problem, IOW, what your actual problem is? Not that I think I could help with it, but maybe others can


----------



## T-Daemon (Oct 23, 2021)

The case with a intermediate version looks like related to the Major upgrade to 14.0.0 of www/gitlab-ce:





						ports - FreeBSD ports tree
					






					cgit.freebsd.org


----------



## vadimk (Oct 23, 2021)

Thank you for fast reply, Zirias.

With gitlab-ce, that I mentioned, is a problem to update to latest. They have even special chapter with version table for this:





						Upgrading GitLab | GitLab
					

Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.




					docs.gitlab.com
				




I was doing this update on Linux host and required to apply intermediate patch 14.1.6 before updating to latest 14.3.3. Otherwice it didn't work.

Now I am doing the same for FreeBSD host that has 14.0.6 version and tries to update to 14.3.3 right away. It didn't work on Linux and it doesn't work on FreeBSD as well. At the moment it is ruby bundle build error:


```
/usr/local/lib/ruby/gems/2.7/gems/gitlab-pg_query-2.0.4/ext/pg_query/src_port_snprintf.c:374:1: error: static declaration of
'strchrnul' follows non-static declaration
strchrnul(const char *s, int c)
```

that came after ruby + gems update. I think (hope) upgrading in several steps may solve the problem. But I am not sure it will help.


----------

