svn commit: r366901 - in head: Keywords Mk/Scripts
Antoine Brodin
antoine at FreeBSD.org
Mon Sep 1 17:06:21 UTC 2014
Author: antoine
Date: Mon Sep 1 17:06:19 2014
New Revision: 366901
URL: http://svnweb.freebsd.org/changeset/ports/366901
QAT: https://qat.redports.org/buildarchive/r366901/
Log:
- Make it possible to use sample keyword with a full path
- Prefer @dirrmtry over @unexec rmdir in makeplist
Differential Revision: https://reviews.freebsd.org/D705
Reviewed by: bapt
With hat: portmgr
Modified:
head/Keywords/sample.ucl
head/Keywords/sample.yaml
head/Mk/Scripts/check-stagedir.sh
Modified: head/Keywords/sample.ucl
==============================================================================
--- head/Keywords/sample.ucl Mon Sep 1 16:56:27 2014 (r366900)
+++ head/Keywords/sample.ucl Mon Sep 1 17:06:19 2014 (r366901)
@@ -16,14 +16,20 @@
actions: [file]
post-install: <<EOD
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
EOD
pre-deinstall: <<EOD
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
Modified: head/Keywords/sample.yaml
==============================================================================
--- head/Keywords/sample.yaml Mon Sep 1 16:56:27 2014 (r366900)
+++ head/Keywords/sample.yaml Mon Sep 1 17:06:19 2014 (r366901)
@@ -16,13 +16,19 @@
actions: [file]
post-install: |
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if ! [ -f "${target_file}" ]; then
/bin/cp -p "${sample_file}" "${target_file}"
fi
pre-deinstall: |
- sample_file="%D/%@"
+ case "%@" in
+ /*) sample_file="%@" ;;
+ *) sample_file="%D/%@" ;;
+ esac
target_file="${sample_file%.sample}"
if cmp -s "${target_file}" "${sample_file}"; then
rm -f "${target_file}"
Modified: head/Mk/Scripts/check-stagedir.sh
==============================================================================
--- head/Mk/Scripts/check-stagedir.sh Mon Sep 1 16:56:27 2014 (r366900)
+++ head/Mk/Scripts/check-stagedir.sh Mon Sep 1 17:06:19 2014 (r366901)
@@ -73,8 +73,16 @@ parse_plist() {
set -- $line
shift
# Ignore the actual file if it is in stagedir
+ case "$@" in
+ /*)
+ echo "@comment ${@%.sample}"
+ echo "${comment}$@"
+ ;;
+ *)
echo "@comment ${cwd}/${@%.sample}"
echo "${comment}${cwd}/$@"
+ ;;
+ esac
;;
# Handle [dirrmty] Keywords
@fc\ *|@fcfontsdir\ *|@fontsdir\ *)
@@ -234,13 +242,11 @@ setup_plist_seds() {
${sed_portdocsexamples} /^share\/licenses/d;"
sed_dirs_gen="s!${PREFIX}/!!g; ${sed_plist_sub} s,^, at 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,^, at dirrmtry ,; \
- s!@dirrmtry \(/.*\)!@unexec rmdir \"\1\" >/dev/null 2>\&1 || :!; \
/^@dirrmtry share\/licenses/d;"
}
@@ -334,7 +340,7 @@ check_invalid_directories_mtree() {
if [ "${PREFIX}" != "${LOCALBASE}" ]; then
case "${line}" in
"@dirrmtry info") continue ;;
- "@unexec rmdir \"${PREFIX}\" >/dev/null 2>&1 || :") continue ;;
+ "@dirrmtry ${PREFIX}") continue ;;
esac
fi
ret=1
More information about the svn-ports-head
mailing list