Hi, these days i've been thinking of a relatively painless way to keep ports updated. I mean painless in two senses: it is easy to implement, and it does little harm to the system.
So here is a proposal. I'm gonna try it. But before that i'd love to hear how other folks think.
It sounds a bit complicated to newbies but i hope those who have experience with building understand what I am talking about. Please bear with me. Anyway here is the scenario:
Since I started porting hundreds of ports for 4.2 in the ports tree a few weeks ago, and I've seen ports being updated almost every day, on one hand I want those latest stuff in the ports tree, on the other hand I don't want to break compatibility of the existing setup and packages. And replacing the whole ports tree, which shouldn't not happen so frequently unless it's a wholesale system upgrade (say 4.2 to 4.3), may break a lot of existing packages, especially when it comes to essential stuff like gtk, qt, etc. What should I do?
Here is one possibility:
While keeping the existing ports tree where I've been porting stuff, create a new ports tree directory side by side.
So let's say, if the current one is /usr/ports, then I downloaded the latest snapshot ports.tar.gz and extract it to /usr/ports_latest.
Then when I see a particular port being updated and I feel like updating the existing package to that new version, I visit the new ports tree and locate the packages that I want to build.
To play safe, they should be basically individual programs but not those "very essential stuff". My bet is that updated packages *usually* don't really depend on the very latest version of the libraries (such as gtk and qt) but have a relatively flexible requirement (such as gtk2 2.8 UP but not necessarily the very latest version).
Then I can try building the new version in this latest ports tree.
If building is successful, I can replace the existing one with pkg_add -r.
This way I can test if this newer package will work or will break anything.
If this is just an ordinary program like file manager or window manager, I guess it should work right away.
If it does cause trouble, then I can simply fall back to the older one.
It seems in principle then I can use the latest ports safely with little risk.
The only tradeoff I see is the additional space taken by the extra ports tree.
What do you think? Or is there any misconception here?