diff --git a/en_US.ISO8859-1/books/porters-handbook/book.sgml b/en_US.ISO8859-1/books/porters-handbook/book.sgml index 42944a63bb..0e839681c7 100644 --- a/en_US.ISO8859-1/books/porters-handbook/book.sgml +++ b/en_US.ISO8859-1/books/porters-handbook/book.sgml @@ -5824,9 +5824,12 @@ PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION} - Cleaning up empty directories + Empty directories - Do make your ports clean up after themselves when they are + + Cleaning up empty directories + + Do make your ports remove empty directories when they are de-installed. This is usually accomplished by adding @dirrm lines for all directories that are specifically created by the port. You need to delete subdirectories @@ -5841,7 +5844,7 @@ lib/X11/oneko/sounds/cat.au @dirrm lib/X11/oneko However, sometimes @dirrm will give you - errors because other ports also share the same subdirectory. You + errors because other ports share the same directory. You can call rmdir from @unexec to remove only empty directories without warning. @@ -5851,6 +5854,22 @@ lib/X11/oneko/sounds/cat.au &man.pkg.delete.1; to exit abnormally even if PREFIX/share/doc/gimp is not empty due to other ports installing some files in there. + + + + Creating empty directories + + Empty directories created during port installation need special + attention. They will not get created when installing the package, + because packages only store the files, and &man.pkg.add.1; creates + directories for them as needed. To make sure the empty directory + is created when installing the package, add this line to + pkg-plist above the corresponding + @dirrm line: + + @exec mkdir -p %D/share/foo/templates + +