diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-07-25 05:03:10 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-07-25 05:03:10 +0800 |
commit | 183899da6197a0b8d38056620954820187ae848a (patch) | |
tree | a3fe1ae634fa7fceec537b48aac3ddc40553392b /Mk/Scripts | |
parent | dcc35378437095dff94e393508d40ec98f85bb21 (diff) | |
download | freebsd-ports-gnome-183899da6197a0b8d38056620954820187ae848a.tar.gz freebsd-ports-gnome-183899da6197a0b8d38056620954820187ae848a.tar.zst freebsd-ports-gnome-183899da6197a0b8d38056620954820187ae848a.zip |
- Fix check-plist so that its 'files in plist but missing from STAGEDIR' check
does not incorrectly ignore plist items in %%DOCSDIR%% and %%EXAMPLESDIR%%.
It was incorrectly ignoring these items when %%PORTDOCS%% or %%PORTEXAMPLES%%
was missing. This manifested as a failure in 'make package' later when pkg(8)
detected the missing files.
With hat: portmgr
Diffstat (limited to 'Mk/Scripts')
-rw-r--r-- | Mk/Scripts/check-stagedir.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh index a435e69aecce..012b18dcc30c 100644 --- a/Mk/Scripts/check-stagedir.sh +++ b/Mk/Scripts/check-stagedir.sh @@ -252,13 +252,20 @@ setup_plist_seds() { sed_plist_sub=$(echo "${PLIST_SUB_SED}" | /bin/sh ${SCRIPTSDIR}/plist_sub_sed_sort.sh) unset PLIST_SUB_SED - sed_files="s!${PREFIX}/!!g; ${sed_plist_sub} ${sed_portdocsexamples} \ - /^share\/licenses/d;" + # Used for generate_plist + sed_files_gen="s!${PREFIX}/!!g; ${sed_plist_sub} \ + ${sed_portdocsexamples} /^share\/licenses/d;" + sed_dirs_gen="s!${PREFIX}/!!g; ${sed_plist_sub} s,^,@dirrmtry ,; \ + ${sed_portdocsexamples} \ + s!@dirrmtry \(/.*\)!@unexec rmdir \"\1\" >/dev/null 2>\&1 || :!; \ + /^@dirrmtry share\/licenses/d;" + # These prevent ignoring DOCS/EXAMPLES dirs with sed_portdocsexamples + sed_files="s!${PREFIX}/!!g; ${sed_plist_sub} /^share\/licenses/d;" sed_dirs="s!${PREFIX}/!!g; ${sed_plist_sub} s,^,@dirrmtry ,; \ - ${sed_portdocsexamples} \ s!@dirrmtry \(/.*\)!@unexec rmdir \"\1\" >/dev/null 2>\&1 || :!; \ /^@dirrmtry share\/licenses/d;" + } # Generate plist from staged files @@ -269,7 +276,7 @@ generate_plist() { find ${STAGEDIR} -type f -o -type l | sort | \ sed -e "s,${STAGEDIR},," >${WRKDIR}/.staged-files comm -13 ${WRKDIR}/.plist-files ${WRKDIR}/.staged-files | \ - sed -e "${sed_files}" \ + sed -e "${sed_files_gen}" \ >>${WRKDIR}/.staged-plist || : ### HANDLE DIRS @@ -282,7 +289,7 @@ generate_plist() { >${WRKDIR}/.staged-dirs-dfs-sorted # Find all staged dirs and then sort them by depth-first (find -ds) comm -13 ${WRKDIR}/.traced-dirs ${WRKDIR}/.staged-dirs-sorted \ - | sort_dfs | sed "${sed_dirs}" \ + | sort_dfs | sed "${sed_dirs_gen}" \ >>${WRKDIR}/.staged-plist || : } |