diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-04-22 02:42:15 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-04-22 02:42:15 +0800 |
commit | 7243b15b29f6802136abc937926ade7999f0fe66 (patch) | |
tree | 69ffdc8da88cfc9e5b58233f2893beef25eef240 | |
parent | 6ba316f9fbf89600e33265f7a72935de7cb99e3c (diff) | |
download | freebsd-ports-gnome-7243b15b29f6802136abc937926ade7999f0fe66.tar.gz freebsd-ports-gnome-7243b15b29f6802136abc937926ade7999f0fe66.tar.zst freebsd-ports-gnome-7243b15b29f6802136abc937926ade7999f0fe66.zip |
- 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
-rw-r--r-- | Mk/Scripts/check-stagedir.sh | 22 |
1 files 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 |