If a binary is built as a "Position Independent Executable" (-fPIC)
the dependency miner would fail because it wasn't testing for that
MIME type. This change fixes that.
* usr/bin/list_package (categorise): Test executables against
'x-(pie-)?(executable|sharedlib)'
Signed-off-by: Steve Youngs <steve@steveyoungs.com>
if [[ -f ${PKGASSETS[$i]} && -x ${PKGASSETS[$i]} ]]; then
UBINS[$U]=$(basename ${PKGASSETS[$i]})
# add to the list of all execs (not scripts)
- if [[ $(file -i ${PKGASSETS[$i]}) =~ x-executable ]]; then
+ if [[ $(file -i ${PKGASSETS[$i]}) =~ x-(pie-)?(executable|sharedlib) ]]; then
AEXEC[$A]=${PKGASSETS[$i]}
A=$((($A + 1)))
fi
-x ${PKGASSETS[$i]} ]]; then
EBINS[$E]=${PKGASSETS[$i]}
# add to the list of all execs (not scripts)
- if [[ $(file -i ${EBINS[$E]}) =~ x-(executable|sharedlib) ]]; then
+ if [[ $(file -i ${EBINS[$E]}) =~ x-(pie-)?(executable|sharedlib) ]]; then
AEXEC[$A]=${EBINS[$E]}
A=$((($A + 1)))
fi