switching from ports to packages

Hello,

I'm using ports to install and update softwares on my laptop. From time to time, i'm running into problems and i need to spend a few hours to fix them.

So i'm thinking to switch to packages, because as they're already built, their should be less problems (isn't it?). Also, i don't need the last versions so i can wait if the packages are not available at the same time as the corresponding ports are updated.

So here is my question:

Is there any procedure to switch from ports to packages?

Thanks,
Tobé
 
tobe said:
Is there any procedure to switch from ports to packages?

Just stop using ports ;)

More seriously though, I think packages might give you more hassle. When installing something you're bound to get messages like "package X needs package Y version 34 but version 33 is installed".

I mainly solve the whole ports dependency issues by starting a clean jail and building all the ports I need in there, using portmaster I create my own packages at the same time. Once everything is done I just use "pkg_delete -a" to remove everything and install my own built packages on my workstation.

The added bonus of this is that I have all the packages I need with my own options set. It also means I can keep a working system while everything is being rebuild. Any issues can be solved without ever touching this working system.

Removing everything and installing the new versions takes about 30 min. so when everything is setup I can quickly upgrade to a new system and be fairly certain it'll work. Just in case I keep the 'old' packages around so I can always go back.
 
It's just a method how to get the binaries into your system. With ports you compile the source code to get the binaries, with packages you simply unpack the binaries. So theoretically you can install a single program from the ports and the second from the packages, however the mixing is NOT recommended. My advise: use the ports and limit the packages to only extra huge things like openoffice.
 
SirDice said:
Just stop using ports ;)

More seriously though, I think packages might give you more hassle. When installing something you're bound to get messages like "package X needs package Y version 34 but version 33 is installed".
Isn't portupgrade -PR supposed to update dependencies as well?
I mainly solve the whole ports dependency issues by starting a clean jail and building all the ports I need in there, using portmaster I create my own packages at the same time. Once everything is done I just use "pkg_delete -a" to remove everything and install my own built packages on my workstation.
Good idea, this way i can check everything builds fine before installing the packages on my system, i must think about it :)
hydra said:
It's just a method how to get the binaries into your system. With ports you compile the source code to get the binaries, with packages you simply unpack the binaries.
Thanks for the precisions ;)
So theoretically you can install a single program from the ports and the second from the packages, however the mixing is NOT recommended. My advise: use the ports and limit the packages to only extra huge things like openoffice.
One of the problem with mixing is about versions, sometime packages are older than ports. Maybe i can force a downgrade with portugrade.

Thanks everybody!

Edit:
Oh well, it's time to do some cleanup, this weekend i'll remove all ports and reinstall only the softwares i really need as packages.
 
tobe said:
Isn't portupgrade -PR supposed to update dependencies as well?
It should but with -P if portupgrade cannot find a package it will use the port. You could use -PP but this can sometimes fail when certain installed ports don't have packages (usually due to license issues) or the packages aren't available on the mirror you're using.
 
For those who want to use just binary packages, have a look at the pkg_upgrade tool which is part of sysutils/bsdadminscripts. This tool uses only binary packages for all upgrades, and does not require anything under /usr/ports (you can actually delete that directory and it will still work).

You'll also want to change the PACKAGESITE* environment variables to point to the packages-X-stable directory on the package servers (where X is 6, or 7, or 8, depending on the version of FreeBSD you run) so that you get the most up-to-date packages. See the ports(7) and pkg_add(1) man pages for details.
 
Hahaha, if you install bsdadminscripts from packages, you won't have pkg_upgrade installed, because the package is soooo outdated...
 
Back
Top