diff --git a/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml index 3ba20446fe..2bf0d93d89 100644 --- a/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml +++ b/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml @@ -81,56 +81,31 @@ Handling Symbolic Links - When creating a symlink, there are two cases, either the - source and target are both within - ${PREFIX}. In that case, use - ${RLN}. In the other case, if one or both - of the paths are outside of ${PREFIX} - use ${LN} -s and only prepend - ${STAGEDIR} to the target's path. + When creating a symbolic link, relative ones are strongly + recommended. Use ${RLN} to create relative + symbolic links. It uses &man.install.1; under the hood to + automatically figure out the relative link to create. - Inside <filename>${PREFIX}</filename>, Create Relative - Symbolic Links + Create Relative Symbolic Links Automatically ${RLN} uses &man.install.1;'s relative symbolic feature which frees the porter of computing the relative path. - ${RLN} ${STAGEDIR}${PREFIX}/lib/libfoo.so.42 ${STAGEDIR}${PREFIX}/lib/libfoo.so + ${RLN} ${STAGEDIR}${PREFIX}/lib/libfoo.so.42 ${STAGEDIR}${PREFIX}/lib/libfoo.so +${RLN} ${STAGEDIR}${PREFIX}/libexec/foo/bar ${STAGEDIR}${PREFIX}/bin/bar +${RLN} ${STAGEDIR}/var/cache/foo ${STAGEDIR}${PREFIX}/share/foo Will generate: &prompt.user; ls -lF ${STAGEDIR}${PREFIX}/lib - lrwxr-xr-x 1 nobody nobody 181 Aug 3 11:27 libfoo.so@ -> libfoo.so.42 - -rwxr-xr-x 1 nobody nobody 15 Aug 3 11:24 libfoo.so.42* - - When used with paths not in the same directory: - - ${RLN} ${STAGEDIR}${PREFIX}/libexec/foo/bar ${STAGEDIR}${PREFIX}/bin/bar - - Will automatically generate the relative symbolic - links: - - &prompt.user; ls -lF ${STAGEDIR}${PREFIX}/bin - lrwxr-xr-x 1 nobody nobody 181 Aug 3 11:27 bar@ -> ../libexec/foo/bar - - - - Outside <filename>${PREFIX}</filename>, Create Absolute - Symbolic Links - - When creating a symbolic link outside of - ${PREFIX}, the source must not contain - ${STAGEDIR}, the target, however, - must: - - ${LN} -sf /var/cache/${PORTNAME} ${STAGEDIR}${PREFIX}/share/${PORTNAME} - - Will generate: - - &prompt.user; ls -lF ${STAGEDIRDIR}${PREFIX}/share - lrwxr-xr-x 1 nobody nobody 181 Aug 3 11:27 foo@ -> /var/cache/foo +lrwxr-xr-x 1 nobody nobody 181 Aug 3 11:27 libfoo.so@ -> libfoo.so.42 +-rwxr-xr-x 1 nobody nobody 15 Aug 3 11:24 libfoo.so.42* +&prompt.user; ls -lF ${STAGEDIR}${PREFIX}/bin +lrwxr-xr-x 1 nobody nobody 181 Aug 3 11:27 bar@ -> ../libexec/foo/bar +&prompt.user; ls -lF ${STAGEDIRDIR}${PREFIX}/share +lrwxr-xr-x 1 nobody nobody 181 Aug 3 11:27 foo@ -> ../../../var/cache/foo