From 7243b15b29f6802136abc937926ade7999f0fe66 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Mon, 21 Apr 2014 18:42:15 +0000 Subject: - Split MTREE check into its own check - Split dependency-owned check its own and make into a non-fatal warning. This is not black-and-white. Python/Rubygem ports cleanup the lib dir for every installed package, and for python/ruby-gems too. This is fine, the extensions should not clean them up then; the error is valid here. However, there's other frameworks which don't cleanup in the master package and yield unexpected results. An example is that php does not cleanup etc/php itself. Only extensions do. So if an extension depends on another extension it will complain that the dependent extension owns etc/php, so we remove from bsd.php.mk, now it's a leftover. The proper place is in the php port itself, but it's unknown how many other cases there are like this. So for now make this non-fatal and into a warning. This is all mostly moot once pkg auto handles directories anyhow. With hat: portmgr Discussed with: antoine --- Mk/Scripts/check-stagedir.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh index dfab7de31c67..d8171ebea1bd 100644 --- a/Mk/Scripts/check-stagedir.sh +++ b/Mk/Scripts/check-stagedir.sh @@ -275,17 +275,29 @@ sort -u ${WRKDIR}/.plist-dirs-unsorted-no-comments \ # Anything listed in plist and in restricted-dirs is a failure. I.e., # it's owned by a run-time dependency or one of the MTREEs. -echo "===> Checking for directories owned by dependencies or MTREEs" -cat ${WRKDIR}/.mtree ${WRKDIR}/.run-depends-dirs | sort -u \ - >${WRKDIR}/.restricted-dirs +echo "===> Checking for directories owned by MTREEs" +cat ${WRKDIR}/.mtree | sort -u >${WRKDIR}/.restricted-dirs +: >${WRKDIR}/.invalid-plist-mtree +comm -12 ${WRKDIR}/.plist-dirs-sorted-no-comments ${WRKDIR}/.restricted-dirs \ + | sort_dfs | sed "${sed_dirs}" \ + >>${WRKDIR}/.invalid-plist-mtree || : +if [ -s "${WRKDIR}/.invalid-plist-mtree" ]; then + ret=1 + while read line; do + echo "Error: Owned by MTREE: ${line}" >&2 + done < ${WRKDIR}/.invalid-plist-mtree +fi + +echo "===> Checking for directories handled by dependencies" +cat ${WRKDIR}/.run-depends-dirs | sort -u >${WRKDIR}/.restricted-dirs : >${WRKDIR}/.invalid-plist-dependencies comm -12 ${WRKDIR}/.plist-dirs-sorted-no-comments ${WRKDIR}/.restricted-dirs \ | sort_dfs | sed "${sed_dirs}" \ >>${WRKDIR}/.invalid-plist-dependencies || : if [ -s "${WRKDIR}/.invalid-plist-dependencies" ]; then - ret=1 +# ret=1 while read line; do - echo "Error: Owned by dependency: ${line}" >&2 + echo "Warning: Possibly owned by dependency: ${line}" >&2 done < ${WRKDIR}/.invalid-plist-dependencies fi -- cgit