1 http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024910.html
4 http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024913.html
6 On May 31, 2016, at 2:52 AM, Elan Ruusamäe wrote:
8 > On 31.05.2016 09:45, Elan Ruusamäe wrote:
9 >> [root@57c8cccdc671 bin]# poldek -u procps
10 > oh, and it's 100% reproducible:
13 Yes. And it has been discussed many times over the last 15y,
14 several times on this list.
17 Disable the mechanism with attached patch to lib/psm.c
20 %scriptlet -p /sbin/ldconfig
21 in packages that are known to invoke an executable that depends on
25 Libraries often have scriptlets like this:
26 %post -p /sbin/ldconfig
27 %postun -p /sbin/ldconfig
28 (or the equivalent within a scriptlet body).
30 On upgrade, with install before erase, this results in 2 executions of /sbin/ldconfig.
32 One of those invocations is redundant when a library is being replaced, the
33 install %post is sufficient to make the library avaialble for loading.
35 The redundant invocation of /sbin/ldconfig was deemed a performance flaw @redhat,
36 where I was asked to implement the current optimization.
38 So the RPM optimization detects when /sbin/ldconfig has just been run, and skips the next
39 %scriptlet -p /sbin/ldconfig
40 (when written exactly like that) if /sbin/ldconfig has been executed.
42 Issues are only seen when a scriptlet contains an executable that needs
43 a changed API: this is usually a very rare occurrence
45 There are other flaws with the optimization when dependency loops break the sorted order
46 (and/or --noorder is used). , and the fix of running /sbin/ldconfig manually is rather simple
47 (even if the problem is obscure).
49 There is another flaw (as in your report), when the very last package
50 has a pending skipped /sbin/ldconfig invocation.
52 The fix of running /sbin/ldconfig manually is rather simple
53 (even if the problem is obscure).
58 ===================================================================
59 RCS file: /v/rpm/cvs/rpm/lib/psm.c,v
60 retrieving revision 2.399.2.20
61 diff -p -u -w -r2.399.2.20 psm.c
62 --- ./lib/psm.c 11 May 2015 21:10:16 -0000 2.399.2.20
63 +++ ./lib/psm.c 31 May 2016 15:19:20 -0000
64 @@ -800,7 +800,7 @@ static rpmRC runEmbeddedScript(rpmpsm ps
65 static int ldconfig_done = 0;
67 /*@unchecked@*/ /*@observer@*/ /*@null@*/
68 -static const char * ldconfig_path = "/sbin/ldconfig";
69 +static const char * ldconfig_path = NULL;
72 * Run scriptlet with args.