Here's some help for the moved KDE ports

Hi gang!

My 11.1 server has KDE installed (which I sporadically use) and I noticed that the port maintainers performed a second (or third?) move of the KDE ports ("Make room for KDE updates"). I use sysutils/portmaster to keep my system up to date and so far I performed these updates manually using portmaster's -o parameter.

This time however there were way too many entries for that thus I figured I'd make a script to handle this. Fun part is that this is also the very first C Shell script I've made (I picked C shell because it handled full lines in its foreach routine better than sh's for x in ...) so I figured I'd share. Maybe some of you can use this:

Code:
#!/bin/csh

## Requires 'kde_moved' to exist, create this file using:
## portmaster -L | grep moved | tee kde_moved

foreach a ("`cat kde_moved`")
  set old=`echo "$a" | cut -d ' ' -f3`;
  set old_pm=`echo $old | cut -d '/' -f2`;
  set new=`echo "$a" | cut -d ' ' -f7`;
## Rebuild (not recommended)
  #echo portmaster $new $old_pm |& tee $0.log
## Edit/move
  echo pkg set -yo $old\:$new;
end
I think this should speak for itself. The reason why I don't recommend rebuilding right away is because of optional dependencies which could also have been renamed. In those cases the system will try to pull in a renamed/moved port which in its turn then tries to install files in the same location as the original one, which is obviously not desired.

So my recommendation is to first let this edit/move run, then update your ports as usual.

Oh, in case you get confused: echo is a command in itself. Remove that to make this script actually work. Consider it a failsafe to make sure that you know what you're doing :)

Hope this can help some of you out.
 
Back
Top