How did upgrading applications happen before portupgrade etc?

Rakhesh Sasidharan rakhesh at rakhesh.com
Sat Aug 11 04:03:32 PDT 2007


Jeremy Chadwick wrote:

> Along those lines, yes.  I'm one of those administrators who does not
> want something like portupgrade on his systems; I do not believe in
> having two separate databases maintaining dependencies and what's
> installed (portupgrade vs. base system pkg_* tools).  Lots of people
> love portupgrade, and that's great.  But the number of times I have seen
> reports of database corruption or "database sync mismatches"
> (portupgrade thinks A, while pkg_* thinks B) is astounding.

Actually, doesn't portupgrade use the same databases as the base tools? It 
just creates other databases based on these existing ones, for faster 
lookups etc, but they are expendable in case of problems afaik. Just 
delete and it will get recreated again ... (I am new to all this, so I 
could be wrong in some way I don't know; this is my understanding).

> There are script-based tools now such as Doug Barton's portmaster which
> I haven't used or looked into yet, but the fact that they rely on the
> stock base pkg_* tools is fantastic.  Those are something I'm open to.

Afaik portmaster's beauty is that it doesn't have any dependencies like 
portuprade does. Doesn't require ruby etc, so upgrades to them don't cause 
problems like they could with portupgrade. (Again, haven't used 
portmaster, so I don't know; this is my understanding).

> Anyways, opinions aside and to answer your question -- the procedure I
> go through is something along these lines:
>
> 1.  Update ports tree (cd /usr/ports && make update)
> 2.  pkg_version -v and look for stuff that's reported outdated or
>    "Comparison failed" (likely the port relocated to another section)
> 3.  Examine the CVS commit log for the port in question.  A lot of the
>    time I'll find that the upgrade simply isn't worth it, so no harm
>    done in leaving it outdated.
> 4.  Shut down services/daemons which might be affected by below steps.
> 5.  pkg_delete port
> 6.  cd /usr/ports/whatever && make clean
> 7.  make config, make && make install
> 8.  Make sure configuration file symlinks didn't get nuked.
> 9.  Restart services/daemons.
> 10. Pay close attention to /var/log/all.log for quite some time.  :-)

I see. In step 5, "pkg_delete port" wont work if port is required by 
others right? So you delete those apps too? Could be a lot of stuff to 
uninstall, right?

> Note that we keep all of our configuration files in a directory called
> /conf/ME and in /usr/local simply use symlinks.  (Matt Dillon might be
> grinning over /conf/ME, since it's a Best Internet-ism :) ).  I don't
> trust that all ports will "play nice" with existing configuration files
> in /usr/local, and I have seen much evidence of this in the past (nuking
> files without your knowledge, mainly.  "Oh crap! It nuked our entire
> configuration for the apache/mail/whatever server!!!").

That's a smashing idea! Thanks for mentioning that here. :-)

What does the "ME" stand for in /conf/ME btw?

Thanks for sharing your traditional steps with here btw.

Regards,
Rakhesh


More information about the freebsd-ports mailing list