proper way to do a recursive install ?

Luigi Rizzo rizzo at icir.org
Thu Feb 1 23:35:38 UTC 2007


On Fri, Feb 02, 2007 at 01:54:14AM +0300, Stanislav Sedov wrote:
> On Thu, 1 Feb 2007 11:03:45 -0800
> Luigi Rizzo <rizzo at icir.org> mentioned:
> >
> >     #--- this is pkg-plist 000
> >     @exec mkdir -p %D/share/linux-bsd-kmod
> >     @exec echo "installing into %D/share/linux-bsd-kmod"
> >     @unexec echo "uninstalling into %D/share/linux-bsd-kmod"
> >     @unexec rm -rf %D/share/linux-bsd-kmod
> >
> 
> That seems to me to be not particulary good. That way you'll delete
> files installed by user into ${PREFIX}/share/linux-bsd-kmod/ by hand.
> It's not good to deinstall files not installed but port, as the one of
> the major properties of ports system to not touch the target file
> system at all.

in this particular case the intention is to have a directory which
is private for a port and not supposed to be manipulated by others.

At least, that's the requirement of my application - i don't want
that someone installs a file in linux-bsd-kmod/linux_compat/asm/videodev.h
that will hide linux-bsd-kmod/linux_compat/asm/videodev.h

So conflict detection should be at the subtree level instead of
being at the file level. And this is trival to implement - checksum
the entire subtree after the install, and verify the checksum before
deleting.

> There're also several reasons we prefer static pkg-plists over
> dynamics. For the first, we has a lot of tools that deals with
> pkg-plists so we can gather some information based on ports pkg-plists

again - for small number of entries, this is perfectly fine.
But when a port installs over 500 files as in one of the examples,
managing information at the file level seems too fine grained.

> automatically. The second reason - you can't be certainly sure that the
> port will behave on the user's systems the same way as on your own.

yes but...

> Having static plists this behaviour can be checked and ensured that
> all files was installed.

and that's the only thing that this tells you,
which is not the same as 'behave as on the other system'.
it depends on a case-by-case basis.

anyways - i can live with a pkg-plist generated at install time and
listing individual files, for deinstall purposes.  But I don't think
it is always expresses the integrity requirements that the application
has (see the inclusion problem above).

	cheers
	luigi


More information about the freebsd-ports mailing list