abompard / fedora-infra / ansible

Forked from fedora-infra/ansible 6 years ago
Clone

afe74d8 bodhi / new-updates-sync / epel7: fix epel7 latest release sync

1 file Authored by kevin 2 years ago, Committed by kevin 2 years ago,
    bodhi / new-updates-sync / epel7: fix epel7 latest release sync
    
    Recently (possibly with the new python in fedora 38), the updates-sync
    logic that updates the 'latest' link for epel-release rpms has started
    replacing it everytime it runs. Since this is every minute, it sometimes
    results in people getting odd perm denied errors when they try and fetch
    it as it's being removed or updated.
    
    The problem seems to be that the script looks for all
    epel-release*noarch* packages under a release tree and then links to the
    x86_64 one. With all the other epel branches, x86_64 was the last one it
    saw with the file glob, so everything was fine.
    
    For some reason on epel7 now, it's seeing them in the following order:
    /pub/epel/7/ppc64/Packages/e/epel-release-7-11.noarch.rpm
    /pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
    /pub/epel/7/ppc64le/Packages/e/epel-release-7-14.noarch.rpm
    /pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm
    
    This means it sees the 'aarch64' one last and since it's not = to the
    x86_64 one, it replaces it. Luckily it's hard coded to use the x86_64
    one so the link is always the same, it's just never equal to the one
    it's checking against.
    
    I am not sure why this is happening only on epel7, but this PR just
    sorts all the path's so that x86_64 is always 'last' and should match
    up.
    
    Signed-off-by: Kevin Fenzi <kevin@scrye.com>