[Rpm-maint] speeding up internal deps generator

Thierry Vignaud thierry.vignaud at gmail.com
Mon Sep 15 15:34:48 UTC 2014


Hi

We've recently switched to internal deps generator.

However one of the deps scripts we use [1] is very slow b/c of this[2]:

 +for path in \
+    $(for tlpath in \
+    $(find ${RPM_BUILD_ROOT}/usr/lib64 ${RPM_BUILD_ROOT}/usr/lib
/usr/lib64 /usr/lib -name '*.typelib'); do
+            dirname $tlpath; done | uniq ); do
+    export GI_TYPELIB_PATH=$GI_TYPELIB_PATH:$path
+done

Previously, it was run once (with so called "external" deps generator).
With internal deps generator, rpm forks it for every matching file.
When lots of files match, this is very slow as it runs tons of find
for every matching file.

This could be workarounded if internal deps generator could offer a
new flag (instead of just "exeonly" & ""magic_and_path" ) that, if
found in the .attr file, would make rpm to call the script just once
with the whole list of files instead of calling it once per file.
It could be named "all_in_one", "fork_once_only", or whatever.

This would be helpfull for most packages builds as most of standard
prov/req scripts already handle more than on file name and thus could
use this new flag.

WDYT?

[1] https://build.opensuse.org/package/view_file/openSUSE:Factory/gobject-introspection/gi-find-deps.sh?expand=1
[2] https://build.opensuse.org/package/rdiff/openSUSE:Factory/gobject-introspection?linkrev=base&rev=36


More information about the Rpm-maint mailing list