[Rpm-maint] speeding up internal deps generator

Michael Schroeder mls at suse.de
Mon Sep 15 16:38:06 UTC 2014

On Mon, Sep 15, 2014 at 05:34:48PM +0200, Thierry Vignaud wrote:
> 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.

In that case the script needs to "annotate" the output in some way.
It has to transport the information, which files generated the dependency.
Otherwise things like 'rpm -q --filerequire' would no longer work.


Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH,  GF Jeff Hawn, HRB 16746 AG Nuernberg

More information about the Rpm-maint mailing list