Subject: Re: Changing order of update process
To: D'Arcy J.M. Cain <darcy@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 12/25/2002 10:42:28
On Wed, 25 Dec 2002, D'Arcy J.M. Cain wrote:

> On Tuesday 24 December 2002 11:09, Frederick Bruckman wrote:
> > On Tue, 24 Dec 2002, D'Arcy J.M. Cain wrote:
> > >     deinstall --> build --> install
> > >
> > > to
> > >     build --> deinstall --> install
> > I've worked out an inchoate system to do just that -- update in place:
> >
> >   ftp://ftp.netbsd.org/pub/NetBSD/misc/fredb/pkg_hack.tar.gz
>
> Cool.  I must check this out later.
>
> > Some known problems:
> >
> > 1) bsd.pkg.mk isn't very friendly about overriding the dependency
> > search targets, so to make that work, I've sacrificed just-in-time-su.
> > Therefore, you have to install as root.
>
> Not a problem for me.  I don't see any difference between installing as root
> or automatically entering the root password every time it asks for it.

The difference is the possibility of trojans running as root, but if
you're updating more than a dozen packages, it's impractical to
supervise and type the root password everytime, so yeah, I don't do
that either. Maybe we should think about turning it around, starting
as root, but "su'ing" to a throw-away user for extract and build.

> > 2) With current, you need to install GNU tar, and set ${GTAR} in the
> > environment.
>
> What features do you depend on?

"--fast-read", at least. I'm just being lazy. I'd rather wait until
some of the PR's requesting new (old) features for pax-as-tar are
fulfilled. "pkg_hack" also depends on "gawk". That's just laziness
too. I think only the compound conditionals need to be expanded. I.e,

foo || bar { baz }

becomes

foo { baz }
bar { baz }

and

foo && bar { baz}

becomes

foo { if (bar) baz }

> > 3) Once you've rebuilt something like "png", you're ultimately going
> > to have to rebuild all the intermediate dependencies (in any case).
> > The pain is only deferred. If you've forgotten that you updated a root
> > package with lots of dependencies, you're might be surprised, when you
> > go to update a "gnome" package, to see many packages being rebuilt.
>
> I don't care if it takes two days to install a package as long as I can use my
> system while all of the packages get rebuilt.

That's the idea! I've rebuilt "gnome" a couple of times while running
under it.

Frederick