RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Replacing /sbin/ldconfig with a lua script

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 28 Oct 2008 - 14:11:55 CET
Message-id: <D8AB93C4-909D-4EAC-B415-49C8C8061CE0@mac.com>

On Oct 28, 2008, at 5:57 AM, devzero2000 wrote:

>
> Opinions?
>
> Could be a very nice way to speedup the rpm installation/update  
> procedure. But i think it should be
> done in a portable way (e.g. different OS use often different  
> implementation for doing what ldconfig do on linux
> and different libc have different requisite - dietlibc UClibc and so  
> on). But are you sure that could be a positive thing
> for RPM to know internally all this - low level - OS difference ?  
> Exists a tradeoff here IMHO.
>

Using (where applicable) internal lua for performance is no loss of  
portability,
existing solutions for other *libc and platforms continue exactly as  
before.

BTW, what would be nice to have is per-distro summary statistics for  
what
is being attempted in rpm scriptlets.

Basically just classifying and counting the types of operations that
are currently being attempted in scriptlets.

E.g. there's a whole class of scriptlets that is attempting /sbin/ 
ldconfig, often as
	%post -p /sbin/ldconfig
but sometimes as
	%post
	...
	/sbin/ldconfig

Another whole class of scriptlets is attempting
	useradd
which the wrlinux lua extensions handle.

There's several types of cache rebuilding, for XML and GNOME icons.

There is a class of scriptlets that attempt daemon restart, or invoke
install-info to insert an index entry.

My guess is that there are maybe 10-20 classes that could be rewritten  
in lua.

Having summary statistics would allow focussing on scriptlet classes  
that could/should
be parameterized and rewritten in lua. The benefits of using lua are  
that rpm, not
the package, is responsible for the script that is run, and fewer  
dependencies
are needed in the package to ensure install/erase scripts are  
functional.

73 de Jeff
Received on Tue Oct 28 14:12:48 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.