Changeset View
Changeset View
Standalone View
Standalone View
Mk/Scripts/qa.sh
| Show First 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | find ${STAGEDIR} -name '*.la' | while read f; do | ||||
| grep -q 'libtool library' "${f}" && | grep -q 'libtool library' "${f}" && | ||||
| err ".la libraries found, port needs USES=libtool" && | err ".la libraries found, port needs USES=libtool" && | ||||
| return 1 || true | return 1 || true | ||||
| done | done | ||||
| # The return above continues here. | # The return above continues here. | ||||
| fi | fi | ||||
| } | } | ||||
| checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool" | libperl() { | ||||
| if [ -n "${SITE_ARCH_REL}" ]; then | |||||
| rc=0 | |||||
| while read f; do | |||||
| # No results presents a blank line from heredoc. | |||||
antoine: Here I think you need to put this:
# No results presents a blank line… | |||||
| [ -z "${f}" ] && continue | |||||
| found=`readelf -d $f | awk "BEGIN {libperl=1; rpath=10; runpath=100} | |||||
| /NEEDED.*${LIBPERL}/ { libperl = 0 } | |||||
| /RPATH.*perl.*CORE/ { rpath = 0 } | |||||
| /RUNPATH.*perl.*CORE/ { runpath = 0 } | |||||
| END {print libperl+rpath+runpath} | |||||
| "` | |||||
Not Done Inline ActionsYou'll need to return 1 for this case, but not you can't without refactoring or using a temp file since this is in a subshell/pipe. bdrewery: You'll need to return 1 for this case, but not you can't without refactoring or using a temp… | |||||
| # FIXME When 8.4 goes out of commission, replace the ;; | |||||
| # with ;& in the case below. | |||||
| if [ "$found" -ne "0" ]; then | |||||
| case "$found" in | |||||
| *1) | |||||
| rc=1 | |||||
| err "${f} is not linked with ${LIBPERL}, not respecting lddlflags ?" | |||||
| ;; #;& | |||||
| *1?) | |||||
| warn "${f} does not have a rpath to ${LIBPERL}, not respecting lddlflags ?" | |||||
| ;; #;& | |||||
| 1??) | |||||
| warn "${f} does not have a runpath to ${LIBPERL}, not respecting lddlflags ?" | |||||
| ;; #;& | |||||
| esac | |||||
| fi | |||||
| # Use heredoc to avoid losing rc from find|while subshell | |||||
| done <<-EOT | |||||
| $(find ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} -name '*.so') | |||||
| EOT | |||||
| return ${rc} | |||||
| fi | |||||
| } | |||||
| checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl" | |||||
| ret=0 | ret=0 | ||||
| cd ${STAGEDIR} | cd ${STAGEDIR} | ||||
| for check in ${checks}; do | for check in ${checks}; do | ||||
| ${check} || ret=1 | ${check} || ret=1 | ||||
| done | done | ||||
| exit $ret | exit $ret | ||||
Here I think you need to put this:
(otherwise there will be like 5000 qa errors!)