tips.paddyonline.net

If you need tips & tricks, here they are...

Joomla! AddThis

Share

FreeBSD full Ports update script

FreeBSD full Ports update script

This is a TCSH (CSH) script.

Its very fundamental use is to update all ports on a FreeBSD system as automatically as possible. If it runs into a problem it will stop and wait for user interaction.

 

Prerequisites

This script is built around the port portupgrade. Without it this script will not work - don't even try :)

Make sure you edit the generated " x " file and put demanded ports first, like libtool and other libs should go first and then perhaps ruby and portupgrade. This will make sure the basic needs are up-to-date and also upgraded to reflect your system.

The script will also create a file called " done " which contain the updated ports as the script goes on. This is also used to make sure it doesn't start over if you have the break the script while it runs.

Preword

This is incomplete work-in-progress. So take it as-is and leave me be. I do not hold any support around this.

Usable options are

  • fullupdate = will create a file called " x " that contain all installed ports.
  • oldupdate = will create a file called " x " that contain all out-dated ports.
  • verbose = will run portupgrade with -v (verbose).
  • force = will run portupgrade with -f (force) - which is needed to upgrade installed up-to-date ports.

Example

This is a short example how I've used it .. enjoy ..

./upd.sh fullupdate

edit x - put stuff first

./upd verbose force

play the waiting game.

Special Notes

The following packages will force you to break the upgrade and do it again. The script will honor the already updated ports and only start the update from where you had to break it.

  • ruby
    • delete the files
      • /var/db/pkg/pkgdb.db
    • and run pkgdb -u
  • ruby dbd
    • delete the files
      • /var/db/pkg/pkgdb.db
      • /usr/ports/INDEX-7.db
    • and run pkgdb -u

It is recommended from me that you put libs and ruby as the first packages in the 'x' file.. that way you will recompile everything with freshly installed libraries and also the get ruby issue as one of the first things that happen.. because it will happen :) After ruby is up-to-date you should have a smooth sailing without to many issues :)

This has been tested upgrading from 6.2 all the way to 8.1 (in steps of 6.4-REL, 7.3-REL and then 8.1-REL).

But .. I cant promise anything!

The script can be found here

Disclaimer

As always I can't be held responsible for the use or miss-use of the above information.
It is provided AS-IS and thus I hold no guaranties that it won't crash and burn your computer kill your mother and nuke the earth.
Good luck!

 

 


 

Add comment

Security code
Refresh

Please consider supporting our efforts.


We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.