Stale pieces in the base system? (was: hardcoded -C argument to ${INSTALL})

From: The Anarcat <anarcat_at_anarcat.ath.cx>
Date: Tue, 6 May 2003 21:56:48 -0400
...impossible! :)

On Tue May 06, 2003 at 08:09:49PM -0400, Garance A Drosihn wrote:
> 
> Here is my current idea, but I have not had time to try and
> implement it.  Modify 'install' to have some kind of log-file
> capability.  Whether or not 'install' changes the destination,
> it *does* know that it was asked to change that destination,
> and could write a line out to a log file for that.

I too had an obscene idea like this, but it was much more perverse and
powerful: Why don't we make that install program record the files in a
package? install(1) (or pkg_install progs) would then know which files
would be where. By bumping a serial or version number somewhere, you
could check which files have been changed/added/removed quite easily.

I recently posted a rather obtuse comment about "shutting the hell up"
on a similar topic, and I threatened the world of hacking my way
through the Mk files to make bsd.{prog,lib}.mk register through the
package system. Well, what I ended up was that odd mess of Makefile
magic and pkg_create voodoo that didn't actually do much except
registering PROG and FILES.

I also discretely advocated for the packaging and splitting of the
base system and it's then that this strange feeling appeared, that
install(1) wasn't doing all it could for us.

What we need is a pkgAPI. Folks on both binup and libh projects ended
up saying the same thing. Actually, what we need is libpkg. A common
interface to the inner guts of pkg_create, pkg_add but mostly
ports/Mk/*.mk magic. Implementing pkg-interaction functions to install
would then be a breeze. Otherwise, it would be a waste of time.

The way I see it, we could add a new flag (eek!) to install that would
be -n or (better) -P and that would be a Package Name under which to
record the files installed. Heck, this could even work in ports! Most
ports out there use some INSTALL_FLAGS or another...

By default, this Package Name would be simply "base", so that everyone
would be happy and backward compatibility would be simple.

Otherwise, if the -P flag would be given, install(1) would try to
register the installed files to the given package. Package version, of
course should be guessed. ;)

There is the problem of the ports that would have to be massively
patched at that point, but I think it would be feasable.

So if you folks keep on coming back to this topic without actually
posting out patchsets or concrete stuff, I'll actually implement this
crazy idea, and you won't have anything more to bikeshed about.

Na!

A.


-- 
Seul a un caractère scientifique ce qui peut être réfuté. Ce qui n'est
pas réfutable relève de la magie ou de la mystique.
                        - Popper, Karl

Received on Tue May 06 2003 - 16:56:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:06 UTC