Differences
This shows you the differences between two versions of the page.
| |
ldconfigandrpm [2012/02/16 17:06] – created jim | ldconfigandrpm [2012/02/16 17:09] (current) – Typos jim |
---|
All fine and normal so far. But in ''foo-1.3'', the library is updated to ''libfoo.so.1.3''. Install foo-1.3, and the library is updated and everything works. | All fine and normal so far. But in ''foo-1.3'', the library is updated to ''libfoo.so.1.3''. Install foo-1.3, and the library is updated and everything works. |
| |
Now downgrade back to ''foo-1.2''. ''foo-1.2'' is installed, its contents unpacked, and its ''%post'' runs ''ldconfig''. Because the old files are not removed, ''ldconfig'' creates ''libfoo.so.1'' as pointing to the latest actual library, which at this stage is still ''libfoo.so.1.3''. ''%post'' completes, and the outgoing package files are then deleted and its '%%postun'' run. Suddenly that ''libfoo.so.1'' link is dangling. | Now downgrade back to ''foo-1.2''. ''foo-1.2'' is installed, its contents unpacked, and its ''%post'' runs ''ldconfig''. Because the old files are not removed, ''ldconfig'' creates ''libfoo.so.1'' as pointing to the latest actual library, which at this stage is still ''libfoo.so.1.3''. ''%post'' completes, and the outgoing package files are then deleted and its ''%postun'' run. Suddenly that ''libfoo.so.1'' link is dangling. |
| |
The only solution I've found so far is to also run ''ldconfig'' in the outgoing package ''%postun'' section. | The only solution I've found so far is to also run ''ldconfig'' in the outgoing package ''%postun'' section. |