# portmaster -af didnt rebuild all ports after upgrade?



## irukandji (Oct 24, 2016)

I have upgraded 10.3 to 11 and i am still finding binaries with .so problems. Looks like portmaster -af didnt rebuild all sources? How to force rebuild of ALL installed ports?


----------



## irukandji (Oct 24, 2016)

portmaster -raf maybe?


----------



## wblock@ (Oct 25, 2016)

The fastest, most complete procedure is shown at the end of portmaster(8).


----------



## irukandji (Oct 25, 2016)

Hm, but the problem here is that it will wreck havoc on my /usr/local. Is there no way to just rebuild all ports and reinstall them?


----------



## SirDice (Oct 25, 2016)

Unless you have specific options enabled I suggest using packages: `pkg-static bootstrap -f` and `pkg upgrade -f`.


----------



## irukandji (Oct 25, 2016)

I have specific options enabled in multiple packages and i dont want into get into pitfall of mixing ports and packages...


----------



## SirDice (Oct 25, 2016)

Then I suggest using Synth or Poudriere to build your own package repository. It will save you from pitfalls like this. Sometimes ports need to be built in a specific order (see /usr/ports/UPGRADING) and building them out of order will get you build failures or applications linked to the wrong (old) libraries. 

If things are just too messed up I'd just make a list of installed packages, `pkg delete` everything (don't worry, your configuration files will survive this) and start fresh. It doesn't hurt to do this on a regular basis anyway, it clears out all the crap you inevitably collect over time.


----------



## wblock@ (Oct 26, 2016)

irukandji said:


> Hm, but the problem here is that it will wreck havoc on my /usr/local. Is there no way to just rebuild all ports and reinstall them?


In what way?  It rebuilds all ports, so those binaries will be replaced.  Otherwise...


----------



## jrm@ (Oct 26, 2016)

SirDice said:


> Then I suggest using Synth or Poudriere to build your own package repository.


Poudriere and Synth use clean/pristine build environments rather than live systems, which improves reliability (less breakage because of quirks and corner cases of a live system).


----------



## Remington (Oct 26, 2016)

+1 on Synth and Poudriere.  Also, you'll have a chance to catch problems and correct them before installing the packages on your live system so you won't break things.


----------



## irukandji (Oct 29, 2016)

Ok, i have installed Synth and it DID upgrade all my ports... the system is almost operational, the only thing i cant figure out is how to use synth for updating jails??


----------



## kpa (Oct 30, 2016)

Easiest way is to use the chroot(8) capability of pkg(8).

`# pkg -c /path/to/jail upgrade`

This assuming that the default repository set up by Synth is suitable for your jail, if not you have to use a different repo with pkg-upgrade(8).

`# pkg -c /path/to/jail upgrade -r jailrepo`


----------



## irukandji (Oct 31, 2016)

Hmmm... this synth is puzzling me, as far as i can see, it will install port on a local system but i dont want it to do that. Jails have ports which are not needed to be installed in live system, like httpd which i only need within jail. I have seen that there is an option to switch profiles, but this doesnt help as it will still install it to my local system. Is there some way to avoid that?


----------



## kpa (Oct 31, 2016)

Synth has different build modes, for example prepare-system only builds the updated ports but doesn't offer to install them on the host system. Refer to the Synth documentation for more:

https://github.com/jrmarino/synth


----------



## irukandji (Nov 1, 2016)

Yes, I did read the communication but this doesnt seem clear to me, i want synth to be able to update existing packages on host system, but i also want it to build some packages and NOT install them to host as they are going to be taken to jail using pkg.


----------



## wblock@ (Nov 1, 2016)

This would be a good time to start a new thread, since this one has nothing to do with portmaster any more.


----------



## marino (Nov 1, 2016)

irukandji said:


> Yes, I did read the communication but this doesnt seem clear to me, i want synth to be able to update existing packages on host system, but i also want it to build some packages and NOT install them to host as they are going to be taken to jail using pkg.



A repository is a collection of packages.  Think of it as a public library where person X needs books alpha, bravo, charlie, person Y needs books delta, echo, foxtrot and person Z needs books golf, hotel and india.
The library would contain all 9 books even though each person only needs 3 books.

A repository is the same thing.  You provide a build list that is your host system needs + your jail system needs and a new repository is created that both systems can use.

If you want any more details, apparently you must start a new thread.  I don't understand the point of the strictness but it's there.


----------



## irukandji (Nov 1, 2016)

Ok, sorry admin, i will start a new thread, and add a link here, I do agree that topic name doesnt reflect the content any more but the debate is connected with theme...


----------



## Oclair (Feb 10, 2019)

irukandji said:


> I have upgraded 10.3 to 11 and i am still finding binaries with .so problems. Looks like portmaster -af didnt rebuild all sources? How to force rebuild of ALL installed ports?



getting the sources into place before doing this is I think goes to where an answer may be.

Unfortunately the hijack of this thread by Synth and Poudriere users covered up inquiring what due diligence was performed to sync sources and/or what step was missed or overlooked


----------



## Yze (Feb 16, 2019)

Oclair, you are responding to a thread that's over 2 years old.


----------

