Skip to content

Instantly share code, notes, and snippets.

@hroncok
Created July 1, 2019 21:11
Show Gist options
  • Save hroncok/52dcfac93149b7498dc05c231eeb66f5 to your computer and use it in GitHub Desktop.
Save hroncok/52dcfac93149b7498dc05c231eeb66f5 to your computer and use it in GitHub Desktop.
(repoquery --repo=rawhide -f '/usr/bin/*3.7*' --qf "%{NAME}" 2>/dev/null;
repoquery --repo=rawhide -f '/usr/bin/*3' --qf "%{NAME}" 2>/dev/null;
repoquery --repo=rawhide -f '/usr/bin/python3-*' --qf "%{NAME}" 2>/dev/null) | sort | uniq > py3_cmd_pkgnames
(for pkg in $(cat py3_cmd_pkgnames); do
repoquery --repo=rawhide -l $pkg 2>/dev/null
done) | grep ^/usr/bin | grep 3 | sort | uniq > py3_cmds
for command in $(cat py3_cmds); do
normalized=$(echo $command | sed 's|/usr/bin/python3-|/usr/bin/|' | sed -E 's|-?3(\.7)?||')
if [ "$normalized" == x"$command" ]; then
continue
fi
pkg=$(repoquery --repo=rawhide -f $command --qf "%{NAME}" 2>/dev/null | head -n1)
repoquery --repo=rawhide --requires $pkg 2>/dev/null | grep python -q || continue
pkg_normalized=$(repoquery --repo=rawhide -f $normalized --qf "%{NAME}" 2>/dev/null | head -n1)
if [ x"$pkg" != x"$pkg_normalized" ]; then
echo $pkg:$command $pkg_normalized:$normalized
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment