Permalink
Browse files

elf2pkgs: use pacman -Qo instead of -Ql

we've got full paths thanks to ldd now, so use them!
  • Loading branch information...
1 parent 29b32b8 commit 414eb84f265d2deafdbba78e585cf7156c0f3d6c @falconindy committed Mar 5, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 elf2pkgs
View
7 elf2pkgs
@@ -17,10 +17,9 @@ resolve_bin() {
depmap["${BASH_REMATCH[1]}"]=${BASH_REMATCH[2]}
done <<< "$lddout"
- pacman -Ql | grep -Ff \
- <(objdump -p "$1" | while read section soname; do
- [[ $section == NEEDED && ${depmap[$soname]} ]] && printf '%s\n' "${depmap[$soname]}"
- done) | cut '-d ' -f1 | sort -u
+ objdump -p "$1" 2>/dev/null | while read section soname; do
+ [[ $section == NEEDED && ${depmap[$soname]} ]] && printf '%s\n' "${depmap[$soname]}"
+ done | pacman -Qqo - 2>/dev/null
}
for bin; do

0 comments on commit 414eb84

Please sign in to comment.