can a rebuild of world be in parts

Hello,

When I want to upgrade from 8.1 to 9.0 I have to rebuild all packages installed from ports.
I think this will costs me around 2 a 3 days.

Now I wonder if this can be done in parts. So a partly rebuild, then stop the machine and the next day go on where I have stopped.

Roelof
 
Thanks for the answer.
But I was looking for a answer at another problem.
# portmaster -Raf rebuilds all installed ports.
When I stop this and shutdown the machine and I would continue I could not do the command again because it's starts all over again.

How can I take care that the ports who are rebuild not get rebuild when I continue.

Roelof
 
That could work if you have a few packages. The last time I had to rebuild there were some 400 - 500 packages to rebuild.

Edit 1 : If I use the output of pkg_libchk and feed it to portmaster. Could that work and how do I do that?
 
Code:
 x11/nvidia-driver     needs updating
ports-mgmt/portupgrade   needs updating
audio/cmus     needs updating
# step 1, the above file [FILE]grep[/FILE]ped from [FILE]pkg_version[/FILE]
# step 2  (Assuming twelve or so [FILE]devel[/FILE] ports in the file...
cat file.pkg_version | grep devel | awk '{print $1}' | xargs -J % portmaster -d -B -P -i -g --update-if newer %
That is just one way. Others similar exist...
 
If you have that many packages installed it may be simpler just to pkg_delete -a and start over.
 
roelof said:
And will # pkg_delete -a delete everything I installed by ports?

Yes, ports or packages will be removed. Any configuration files however will remain so if you install the port or package again you won't have to configure it as it will use the existing configuration file.
 
roelof said:
When I want to upgrade from 8.1 to 9.0 I have to rebuild all packages installed from ports.
I think this will costs me around 2 a 3 days.

Now I wonder if this can be done in parts. So a partly rebuild, then stop the machine and the next day go on where I have stopped.

Careful with the terminology--this is not a rebuild of "world".

Depends on why you want to break this up. If you are concerned about downtime for a server, the best way is to install the new system on a fresh disk, do all the upgrading on that offline system, then swap the disk into the server after all the upgrades are done.

If you have a dual-boot desktop and just need to be able to use the other operating system at the same time, convert the FreeBSD system into a VM.

Otherwise, breaking up the rebuild of ports is tricky. When the system comes up with only some of the ports rebuilt, it may not all work. The procedure at the end of the portmaster(8) man page works, and portmaster shows a list of ports remaining to be upgraded when you control-c out of it. Save that, possibly by running the session inside script(1), and you can probably pick up where you left off.

Another approach is packages, but I don't use them so someone else can comment.
 
SirDice said:
Yes, ports or packages will be removed. Any configuration files however will remain so if you install the port or package again you won't have to configure it as it will use the existing configuration file.

Careful, ports are not supposed to remove customized config files, but it's not guaranteed. Back up /usr/local/etc/ before deleting packages.
 
Portmaster's man:
Using portmaster to do a complete reinstallation of all your ports:
  1. portmaster --list-origins > ~/installed-port-list
  2. Update your ports tree
  3. portmaster -ty --clean-distfiles
  4. portmaster --check-port-dbdir
  5. portmaster -Faf
  6. pkg_delete -a
  7. rm -rf /usr/local/lib/compat/pkg
  8. Back up any files in /usr/local you wish to save, such as configuration files in /usr/local/etc
  9. Manually check /usr/local and /var/db/pkg to make sure that they are really empty
  10. Re-install portmaster
  11. portmaster `cat ~/installed-port-list`
You probably want to use the -D option for the installation and then run --clean-distfiles [-y] again when you are done. You might also want to consider using the --force-config option when installing the new ports.

Alternatively you could use portmaster -a -f -D to do an "in place" update of your ports. If that process is interrupted for any reason you can use portmaster -a -f -D -R to avoid rebuilding ports already rebuilt on previous runs. However the first method (delete everything and reinstall) is preferred.
 
Back
Top