Created
March 24, 2014 00:54
-
-
Save Gottox/9732362 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
# This hook checks for sobumps and warns the user if there are any | |
hook() { | |
local filename= rev= libname= conflictPkg= conflictFile= conflictRev= \ | |
mapshlibs=$XBPS_COMMONDIR/shlibs | |
find $DESTDIR -name '*.so.*' -type f | while read filename; do | |
rev=${filename#*.so.} | |
libname=`basename ${filename%.so.*}` | |
grep -E "^${libname}\.so\..*[[:blank:]]$pkgname" $mapshlibs | \ | |
while read conflictFile conflictPkg; do | |
conflictRev=${conflictFile#*.so.} | |
[ "$rev" = "$conflictRev" ] || \ | |
[[ "$rev".* =~ "$conflictRev" ]] && \ | |
continue | |
msg_warn "SOBUMP: $libname: old: $conflictRev new: $rev\n" | |
done | |
done | |
if [ "$XBPS_SOBUMP_FATAL" -a "$conflictPkg" ]; then | |
return 1; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment