diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2014-10-03 18:22:46 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2014-10-03 18:22:46 +0000 |
commit | 63fc9a3edb99af3f6cd3a2ae7c60bc8a99d71850 (patch) | |
tree | aba74cf6d053e6e333450b4eb950914835884652 /Mk | |
parent | 36716bd31eab19bf4f28d467f76fd3fee68b1b0b (diff) | |
download | freebsd-ports-63fc9a3edb99af3f6cd3a2ae7c60bc8a99d71850.zip |
check-plist no longer needs to check for directories owned by dependencies.
pkg-1.3.8's auto directory handling makes this a non-issue.
We should add a new check to warn of possibly needing @dir for empty dirs
though.
With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/check-stagedir.sh | 53 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 3 |
2 files changed, 2 insertions, 54 deletions
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh index 41e3d3e44beb..a1ecb1da8d35 100644 --- a/Mk/Scripts/check-stagedir.sh +++ b/Mk/Scripts/check-stagedir.sh @@ -189,30 +189,6 @@ parse_mtree() { } >${WRKDIR}/.mtree } -pkg_get_recursive_deps() { - echo "$@" - PKG_CHECKED="${PKG_CHECKED} $@" - for depends in $(${PKG_QUERY} '%do' $@ | sort -u); do - [ -z "${depends}" ] && return - case " ${PKG_CHECKED} " in - *\ ${depends}\ *) continue ;; - esac - pkg_get_recursive_deps "${depends}" - done -} - -### GATHER DIRS OWNED BY RUN-DEPENDS. WHY ARE WE SCREAMING? -lookup_dependency_dirs() { - : >${WRKDIR}/.run-depends-dirs - if [ -n "${PACKAGE_DEPENDS}" ]; then - echo "${PACKAGE_DEPENDS}" | while read pkg; do \ - PKG_CHECKED= pkg_get_recursive_deps "${pkg}"; \ - done | sort -u | xargs ${PKG_QUERY} "%D" | \ - sed -e 's,/$,,' | sort -u \ - >>${WRKDIR}/.run-depends-dirs - fi -} - # Sort a directory list by the order of the dfs-sorted file (from find -ds) sort_dfs() { while read dir; do @@ -268,7 +244,7 @@ generate_plist() { ### HANDLE DIRS cat ${WRKDIR}/.plist-dirs-unsorted ${WRKDIR}/.mtree \ - ${WRKDIR}/.run-depends-dirs | sort -u >${WRKDIR}/.traced-dirs + | sort -u >${WRKDIR}/.traced-dirs find -sd ${STAGEDIR} -type d | sed -e "s,^${STAGEDIR},,;/^$/d" \ >${WRKDIR}/.staged-dirs-dfs sort ${WRKDIR}/.staged-dirs-dfs >${WRKDIR}/.staged-dirs-sorted @@ -324,27 +300,6 @@ check_orphans_from_plist() { return ${ret} } -# Check for directories in plist that dependencies already handle. -# XXX: This goes away when pkg learns auto dir tracking -check_invalid_directories_from_dependencies() { - local ret=0 - 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 - while read line; do - echo "Warning: Possibly owned by dependency: ${line}" \ - >&2 - done < ${WRKDIR}/.invalid-plist-dependencies - fi - return ${ret} -} - # Check for items in plist not in STAGEDIR (pkg lstat(2) errors) check_missing_plist_items() { local ret=0 @@ -393,7 +348,7 @@ esac # validate environment envfault= for i in STAGEDIR PREFIX LOCALBASE WRKDIR WRKSRC MTREE_FILE GNOME_MTREE_FILE \ - TMPPLIST PLIST_SUB_SED SCRIPTSDIR PACKAGE_DEPENDS PKG_QUERY \ + TMPPLIST PLIST_SUB_SED SCRIPTSDIR \ PORT_OPTIONS NO_PREFIX_RMDIR do if ! ( eval ": \${${i}?}" ) 2>/dev/null ; then @@ -419,9 +374,6 @@ fi parse_mtree -lookup_dependency_dirs -unset PACKAGE_DEPENDS PKG_QUERY - setup_plist_seds generate_plist @@ -437,7 +389,6 @@ check_orphans_from_plist || ret=1 sort -u ${WRKDIR}/.plist-dirs-unsorted-no-comments \ >${WRKDIR}/.plist-dirs-sorted-no-comments -check_invalid_directories_from_dependencies || ret=1 check_missing_plist_items || ret=1 if [ ${ret} -ne 0 ]; then diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 2561d18ebf57..a30cb35fcd14 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1805,9 +1805,6 @@ MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} .endif -CO_ENV+= PACKAGE_DEPENDS="${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,}" \ - PKG_QUERY="${PKG_QUERY}" - .if defined(NO_PREFIX_RMDIR) CO_ENV+= NO_PREFIX_RMDIR=1 .else |