Last active
February 24, 2023 07:31
-
-
Save fumiyas/fced82cbb4de6704dcf7af4cbc218e36 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
rpm -qa --queryformat '%{name}\n' "$@" \ | |
|xargs rpm -qR \ | |
|grep -E -v '^(lib[^(]+\.so(\.[0-9]+)+\([^)]|(config|rpmlib)\()' \ | |
|sort -u \ | |
|xargs yum provides --disablerepo='*' --cacheonly --noplugins \ | |
|sed -n -e '/./{ H; $! d; }' -e 'x; s/^\n//; s/^[0-9]*://; s/\n.*//; s/\s*: .*//; p;' \ | |
|sort -u \ | |
|xargs rpm -q --queryformat '%{name} %{version} %{release} %{arch}\n' \ | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment