How did upgrading applications happen before portupgrade etc?

Alexander Leidinger Alexander at Leidinger.net
Sun Aug 12 05:21:06 PDT 2007


Quoting RW <fbsd06 at mlists.homeunix.com> (Sat, 11 Aug 2007 22:58:58 +0100):

> On Sat, 11 Aug 2007 13:33:22 -0700
> Jeremy Chadwick <koitsu at FreeBSD.org> wrote:
> 
> > On Sat, Aug 11, 2007 at 03:02:53PM +0400, Rakhesh Sasidharan wrote:
> > >> 5.  pkg_delete port
> > >
> > > 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?
> > 
> > Absolutely correct.  That might seem like a nightmare to most people,
> > but to me it's not. 
> 
> It's not correct,  "pkg_delete -f" can force the deletion. I would
> manually upgrade a port like this:
> 
> cd /usr/ports/misc/foo 
> make   ; do the build
> pkg_info -qO misc/foo ; get old package name
> pkg_create -b <old-package-name>  ; backup existing package
> /usr/local/etc/rc.d/foo stop ; stop the daemon if needed
> pkg_delete -f <old-package-name>  ; force removal
> make install

At this point your /var/db/pkg/ directory does not reflect reality
anymore, e.g. all ports which depend upon this port still list the old
version of it. Before I used portupgrade I had some scripts which
dealed with parts of this problem. You also lose the +REQUIRED_BY
file of the updated port. My scripts solved the urgent dependency
problems. When portupgrade came along and was stable it had all those
nice features I would have been happy to see in my own scripts but
never had the pressure to implement because they where not that
important for me. I also have to do less work by hand when using
portupgrade.

It may be not the best implementation for such a tool, but it's a huge
step forward compared to what we had before.

> /usr/local/etc/rc.d/foo start ; start the daemon if needed
> make clean
> rm <back-up package> 

Bye,
Alexander.

-- 
Change is the essential process of all existence.
		-- Spock, "Let That Be Your Last Battlefield", stardate 5730.2
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-ports mailing list