# qt ports update instruction



## YuryG (Feb 19, 2017)

Well, in /usr/ports/UPDATING we get a record on changes in Qt ports. But there's no instructions how to deal with them. Simple portupgrade qt4-\* definately end in a bunch of errors. So, I suppose, I have to delete all existing qt4- ports and then try to install new ones. Is there a "user-friendly" way?


----------



## talsamon (Feb 20, 2017)

It is also not really clear how qtchooser works. On pipermail
someone  reports
qtchooser conflicts with a number of Qt 4 ports, because they installed
binaries into /usr/local/bin that qtchooser wants to replace with its
own scripts now.
.....


----------



## YuryG (Feb 20, 2017)

Definitely, and upgrade of (any?) qt4- port needs now devel/qtchooser that conflicts with all the rest installed qt4- ports.
I had to manually deinstall all qt4- packages (saving list of them before that) and then `portinstall` them again.


----------



## phoenix (Feb 20, 2017)

It's bizarre that there's nothing listed in UPDATING about how, specifically, to deal with this change.  Usually there's a line or two at the bottom that includes instructions for portmaster/portupgrade users.  There's a couple of threads about this on the freebsd-ports mailing list.

The easiest method is to use `pkg info` to get a list of *qt4-* and *qt5-* ports, then `pkg delete -f` them all, then manually re-install them.  That will pick up the new dependencies and origins, and install everything to the correct locations.

Or use something like poudriere/synth to create a new pkg repo with all the changes, and just `pkg upgrade` to fix everything.


----------



## YuryG (Feb 21, 2017)

phoenix said:


> …The easiest method is to use `pkg info` to get a list of *qt4-* and *qt5-* ports, then `pkg delete -f` them all, then manually re-install them.  That will pick up the new dependencies and origins, and install everything to the correct locations.
> 
> Or use something like poudriere/synth to create a new pkg repo with all the changes, and just `pkg upgrade` to fix everything.


Exactly what I've done already.
May be port's maintainers don't bother of portupgrade/portmaster users, only newer "always rebuild (almost) everything" with poudriere/synth approach?


----------



## Jakeotr (Apr 30, 2017)

I know this thread is getting old, but I have been having issues with the devel/qtchooser port and found this info on the mailing list...seems to work well


```
pkg delete -f qt4-linguisttools-4.8.7
  pkg delete -f qt4-rcc-4.8.7
  cd /usr/ports/misc/qtchooser/ && make install clean
  pkg delete -f qt4-qmake-4.8.7
  cd /usr/ports/devel/qt4-qmake/ && make install clean
  cd /usr/ports/devel/qt4-linguisttools/ && make install clean
  cd /usr/ports/devel/qt4-rcc/ && make install clean
```
`portupgrade -arR` was then able to finish the rest."

Although I use portmaster and there were no hiccups....cheers


----------

