[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What do you wish for in an package manager?



On Wed, Jan 03, 2001 at 03:40:21PM +0100, Laurent Martelli wrote:
> /usr/doc - /usr/share/doc transition problems are one consequence of
> this. If files were tagged according to some high level criterions, it
> would be easier to put change the physical location during
> installation. Setting the path in the package is bad idea from that
> point of view.
> 
> I think that installation scripts should be rather declaratives : in
> fact they should not be scripts. It would avoid security problems
> because of badly written scripts, and allow easier extensibility by
> simply interpreting the declarations in a different way, rather than
> having to rewrite all the scripts of all packages.


I've had similar thoughts, and I thought that perhaps some of
functions of installation scripts can be replaced by hook scripts that
dpkg would run.

So you'd have something like, say, eight directories at
/usr/lib/dpkg-hooks/{before,after}-{pre,post}-{install,remove}/. Dpkg
would run the scripts in them at the proper times. Each script would
define a file pattern that specifies which packages installations or
removals interest it. So, for instance,
/usr/lib/dpkg-hooks/before-post-install/40_dlconfig could specify that
it wants to be run every time a packages installs a file that matches
/usr/lib/*.so, and run just after unpacking.

I think many of the installation scripts would become unnecessary this
way. Also, it would be possible to change a distribution's behavior
without messing with every package -- a cleaner solution to the
/usr/doc and /usr/share/doc transition problem might be been
possible. And it would be easy to do things that right now are
difficult: for example, a package or the sysadmin could install hooks
to remount automatically some arbitrary filesystem r/o and r/w when a
package install wantes to touch it.



	- Adi Stav



Reply to: