08e0ad8 Rewrite scriptlets to call /sbin/ldconfig in lua

Authored and Committed by zbyszek 2 years ago
1 file changed. 6 lines added. 4 lines removed.
    Rewrite scriptlets to call /sbin/ldconfig in lua
    
    The scriptlet in glibc adds a dependency on bash to glibc-common,
    which is required by glibc, so effectively the whole world depends on
    bash. By rewriting the script in lua we drop this dependency, and also
    to avoid a (bogus?) warning from rpm about a dependency loop.
    
    If the call fails, an error is printed but the transaction is not failed.
    (The original script didn't have "|| :", so the return value from
    /sbin/ldconfig would be the return value from the script, causing
    the transaction to fail.)
    
    Quoting https://bugzilla.redhat.com/show_bug.cgi?id=2018913#c34:
    
    warning: SCC #1: 5 members (5 external dependencies)
    warning:        glibc-2.35-2.fc37.x86_64
    warning:                -> glibc-minimal-langpack-2.35-2.fc37.x86_64
    warning:                -> glibc-common-2.35-2.fc37.x86_64
    warning:        ncurses-libs-6.2-9.20210508.fc36.x86_64
    warning:                -> glibc-2.35-2.fc37.x86_64
    warning:        bash-5.1.16-2.fc36.x86_64
    warning:                -> ncurses-libs-6.2-9.20210508.fc36.x86_64
    warning:                -> glibc-2.35-2.fc37.x86_64
    warning:        glibc-common-2.35-2.fc37.x86_64
    warning:                -> glibc-2.35-2.fc37.x86_64
    warning:                -> bash-5.1.16-2.fc36.x86_64
    warning:        glibc-minimal-langpack-2.35-2.fc37.x86_64
    warning:                -> glibc-common-2.35-2.fc37.x86_64
    warning:                -> glibc-2.35-2.fc37.x86_64
    
    If we look into SCC #1, bash obviously requires glibc because it links
    to it. The loop is created by glibc → glibc-common → bash, because
    glibc-common has %transfiletriggerin and %transfiletriggerpostun using
    bash to call /sbin/ldconfig.
    
    https://github.com/coreos/rpm-ostree/pull/3453 provides a workaround
    so that rpm-ostree doesn't choke on this.
    
        
file modified
+6 -4