Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=1ced20a9fee90e8b14cc436ad804d637b3f58afc
commit 1ced20a9fee90e8b14cc436ad804d637b3f58afc Author: Michel Hermier <[email protected]> Date: Tue Nov 20 14:28:00 2012 +0100 scripts/makepkg * Transform symbolic link check to a hook. diff --git a/scripts/makepkg b/scripts/makepkg index 23fc1d1..9430d41 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -1842,6 +1842,21 @@ if [ ! "`check_option NOSTRIP`" -a "$NOSTRIP" = "0" ]; then _P_subpkgsfixes+=(_pkg_strip_hook) fi +_pkg_check_links() +{ + local d="$(pwd)" l + + msg "$1: Checking symbolic links..." + for l in `find $d -type l 2> /dev/null` ; do + if [ ! -e "$l" -a ! -e "$d/`ls -l $l | awk '{print $NF}'`" ]; then + msg2 "Maybe broken link ${l#$d} in pkg $1 found." + elif ls -l "$l" | awk '{print $NF}' | grep -q "$startdir" ; then + msg2 "Broken link ${l#$d} in pkg $1 found." + fi + done +} +_P_subpkgsfixes+=(_pkg_check_links) + do_subpkgsfixes() { local hook package_name @@ -1870,26 +1885,6 @@ done do_subpkgsfixes -# check symbolic links -msg "Checking symbolic links..." -for d in $startdir/{pkg,pkg.*} ; do - for l in `find $d -type l 2> /dev/null` ; do - if [ ! -e "$l" -a ! -e "$d/`ls -l $l | awk '{print $NF}'`" ]; then - if [ "$d" = "$startdir/pkg" ]; then - msg2 "Maybe broken link ${l#$d} in pkg $pkgname found." - else - msg2 "Maybe broken link ${l#$d} in pkg ${d##*/pkg.} found." - fi - elif ls -l "$l" | awk '{print $NF}' | grep -q "$startdir" ; then - if [ "$d" = "$startdir/pkg" ]; then - msg2 "Broken link ${l#$d} in pkg $pkgname found." - else - msg2 "Broken link ${l#$d} in pkg ${d##*/pkg.} found." - fi - fi - done -done - # get some package meta info builddate=`LC_ALL= ; LANG= ; date -u "+%a %b %e %H:%M:%S %Y"` if [ "$INCHROOT" != "1" ]; then _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
