$ tree /usr/share/doc/scribus-* /usr/share/doc/scribus-0.7.4-r1 `-- html -> /usr/share/scribus/doc /usr/share/doc/scribus-0.8 /usr/share/doc/scribus-1.1.5 `-- html -> /usr/share/scribus/doc /usr/share/doc/scribus-1.1.6 `-- html -> /usr/share/scribus/doc /usr/share/doc/scribus-1.1.7 `-- html -> /usr/share/scribus/doc /usr/share/doc/scribus-1.2 `-- html -> /usr/share/scribus/doc /usr/share/doc/scribus-1.2.2.1 |-- AUTHORS.gz |-- ChangeLog.gz |-- README.gz |-- TODO.gz `-- html -> /usr/share/scribus/doc /usr/share/doc/scribus-1.2.2-r1 `-- html -> /usr/share/scribus/doc 7 directories, 4 files
proposed fix: pkg_postrm(){ [ -n "${PF}" ] && rm -rf /usr/share/doc/${PF} } This doesn't clean up stale directories of previous versions, but is as safe as possible, imho.
better make that pkg_postrm(){ [ -n "${PF}" ] && rm -rf ${ROOT}/usr/share/doc/${PF} }
This removes the docs for the *current* version if you just re-emerge it.
I've now changed the scribus-ebuild not to symlink the docs, but to move them completely to /usr/share/doc. This won't remove old stale symlinks, but it will not create new ones.