Created
May 24, 2021 14:14
-
-
Save pterjan/c25d78b14d3b821112aa65b3289c25b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repository=/distrib/bootstrap/distrib/cauldron | |
media=core/release | |
dep_to_kill=libperl.so.5.32 | |
urpmf --synthesis "${repository}/x86_64/media/${media}/media_info/synthesis.hdlist.cz" --qf '%sourcerpm:%provides' : | sed 's/\[.*\]$//' | sort -u > data/provides | |
urpmf --synthesis "${repository}/SRPMS/${media}/media_info/synthesis.hdlist.cz" --qf %name-%version-%release.src.rpm:%requires : | sed 's/\[.*\]$//' | sort -u > data/requires | |
urpmf --synthesis /distrib/bootstrap/distrib/cauldron/x86_64/media/core/release/media_info/synthesis.hdlist.cz --sourcerpm --requires "${dep_to_kill}" | cut -d: -f2 | sort -u > todo | |
cat todo | while read src; do | |
# Ignore binaries from old src.rpm | |
[ -f "${repository}/SRPMS/${media}/${src}" ] || continue | |
grep "^$src:" data/requires | while read l; do | |
req=$(echo $l | cut -d: -f2) | |
prov=$(grep ":${req}$" data/provides | cut -d: -f1) | |
[ "$prov" = "$src" ] && continue | |
grep -q "^${prov}$" todo || continue | |
echo "$prov" | |
done | sort -u > "data/${src}.missing" | |
grep -q . "data/${src}.missing" && continue | |
rm -f "data/${src}.missing" | |
echo $(echo $src | sed s/-[^-]*-[^-]*$//) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment