Improving speed of transactions

Jakub 'Livio' Rusinek jakub.rusinek at gmail.com
Tue Mar 25 14:30:11 UTC 2008


Hi,

I want to share my thoughts about RPM.



Currently, when a lib is installed, it runs ldconfig, but it could be
done in a smarter way.

When few libs are installed, every one calls "ldconfig" and that's
slowing down transaction without special reason.

Lib, instead of running ldconfig, could set special variable, using RPM
macro %ldconfig.

Code run by the macro:

| if [-e LDCONFIG] then
| 	case "$LDCONFIG" in
| 		1) exit 0;;
| 		0) export LDCONFIG=1;;
| 		*) ;;
| 	esac
| fi

This code might not be valid, but you can easily understand it's logic:

* if variable exists, value is checked;

* if it is already set as enabled, nothing is done. If isn't enabled,
script enables it.

Same for gtk-update-icon-cache, but with GTK_UPDATE_ICON_CACHE variable
for example.

After transaction some kind of rpm_config (name similliar to
rpm_check_debug) could be run and update all the caches etc.



Idea was taken from openSUSE. They made this with SuSEconfig scripts,
but can have same idea with better implementation.

-- 
Jakub 'Livio' Rusinek
http://liviopl.jogger.pl/




More information about the fedora-devel-list mailing list