Page MenuHomeFreeBSD

D705.id1320.diff
No OneTemporary

D705.id1320.diff

Index: head/Keywords/sample.ucl
===================================================================
--- head/Keywords/sample.ucl
+++ head/Keywords/sample.ucl
@@ -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}"
Index: head/Keywords/sample.yaml
===================================================================
--- head/Keywords/sample.yaml
+++ head/Keywords/sample.yaml
@@ -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}"
Index: head/Mk/Scripts/check-stagedir.sh
===================================================================
--- head/Mk/Scripts/check-stagedir.sh
+++ head/Mk/Scripts/check-stagedir.sh
@@ -73,8 +73,16 @@
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 @@
${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 ,; \
- s!@dirrmtry \(/.*\)!@unexec rmdir \"\1\" >/dev/null 2>\&1 || :!; \
/^@dirrmtry share\/licenses/d;"
}
@@ -334,7 +340,7 @@
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

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 29, 7:18 PM (33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32380795
Default Alt Text
D705.id1320.diff (2 KB)

Event Timeline