Re: dash: fails to install when /usr/share/man doesn't exist
Neil Williams wrote:
> /usr/share/man/ is not essential in it's own right. Packages should
> still install correctly if /usr/share/man does not already exist. The
> problem reveals itself because dpkg-divert correctly skips files which
> don't exist but then dash assumes that the file does exist.
> with dpkg-filters, it is quite possible that ./usr/share/man will not
> exist on an otherwise standard Debian system.
Thanks for explaining. This being preinst, I suppose the simplest
fix would be to run
mkdir -p /usr/share/man/man1
before writing a symlink there. (base-files contains /bin and
/usr/share/man but not /usr/share/man/man1.)
Hmm, whenever a directory under doc/ changes to a symlink or vice
versa, there will be trouble (based on "grep -F /usr/share/doc
/var/lib/dpkg/info/*inst"). I agree that stripping away docs to save
space is a worthwhile use case; sounds worth documenting in policy.
> However, simply having empty directories isn't going to prevent ln
> failing if the original file does not exist either.
In this case it would. It is intended that the targets of the
symlinks may not exist yet, since if I run
rm -f /usr/share/man/man1/dash.1.gz
apt-get reinstall dash
then the second command must not fail.
> e.g. with multistrap, it is trivial to write a setupscript which
> ensures that particular directories, like /usr/share/man/ exist before
> packages get configured.
Ah, good to hear.
Thanks again for the clear explanation, and thanks for making some