]>
Commit | Line | Data |
---|---|---|
8c28fc02 ER |
1 | http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024910.html |
2 | ||
3 | patch from jbj answer: | |
4 | http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024913.html | |
5 | ||
6 | On May 31, 2016, at 2:52 AM, Elan Ruusamäe wrote: | |
7 | ||
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: | |
11 | > | |
12 | ||
13 | Yes. And it has been discussed many times over the last 15y, | |
14 | several times on this list. | |
15 | ||
16 | Short answer: | |
17 | Disable the mechanism with attached patch to lib/psm.c | |
18 | - OR -- | |
19 | Don't use | |
20 | %scriptlet -p /sbin/ldconfig | |
21 | in packages that are known to invoke an executable that depends on | |
22 | a new library. | |
23 | ||
24 | Longer answer: | |
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). | |
29 | ||
30 | On upgrade, with install before erase, this results in 2 executions of /sbin/ldconfig. | |
31 | ||
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. | |
34 | ||
35 | The redundant invocation of /sbin/ldconfig was deemed a performance flaw @redhat, | |
36 | where I was asked to implement the current optimization. | |
37 | ||
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. | |
41 | ||
42 | Issues are only seen when a scriptlet contains an executable that needs | |
43 | a changed API: this is usually a very rare occurrence | |
44 | ||
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). | |
48 | ||
49 | There is another flaw (as in your report), when the very last package | |
50 | has a pending skipped /sbin/ldconfig invocation. | |
51 | ||
52 | The fix of running /sbin/ldconfig manually is rather simple | |
53 | (even if the problem is obscure). | |
54 | ||
55 | hth | |
56 | ||
57 | 73 de Jeff | |
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; | |
66 | ||
67 | /*@unchecked@*/ /*@observer@*/ /*@null@*/ | |
68 | -static const char * ldconfig_path = "/sbin/ldconfig"; | |
69 | +static const char * ldconfig_path = NULL; | |
70 | ||
71 | /** | |
72 | * Run scriptlet with args. | |
73 | ||
74 |