Bug#40706: AMENDMENT 17/7/99] /usr/share/doc vs. /usr/doc transition
Hi,
>>"Richard" == Richard Braakman <dark@xs4all.nl> writes:
Richard> That should be postinst and prerm, to stay out of dpkg's
Richard> way. If you remove it only in the postrm, then you will
Richard> break downgrades to pre-FHS versions.
I shall so amend the proposal.
Richard> To be completely correct, the symlink should also be removed
Richard> in the postrm if it is called with "disappear", because the
Richard> prerm is not called in that case. It is rare for packages
Richard> to disappear, however.
I shall add this paragraph too.
Richard> I think the symlink should be absolute, not relative.
Richard> /usr/doc is a likely directory to be symlinked to somewhere
Richard> else by the sysadmin (for example, to deal with this
Richard> transition :-), and the normal reason for using relative
Richard> links (that the link should still work if the filesystem is
Richard> mounted in an unusual place) is not very important here.
Hmm. I am almost convinced. Opinions, folks?
Richard> This seems unnecessarily complex. You do not need to change
Richard> the directory.
Well, it makes me feel better when creating symbolic links.
Richard> One problem remains: There is no $package variable available
Richard> when the maintainer scripts are run. The package name will
Richard> have to be hardcoded in the scripts, and for multi-binary
Richard> packages that will be rather more work than is advertised.
For multi binary packages I tend to have separate installation
script for each binary package. Is that not the case generally? (I
also tend to have the package name in a lot of maintainer scripts, as
well as the version, but that does not seem to be the norm).
Would something like this help?
PACKAGES="package_A package_B package_C"
for package in $PACKAGES; do
if [ -d /usr/doc ]; then
if [ ! -e /usr/doc/$package -a -d /usr/share/doc/$package ]; then
ln -s /usr/share/doc/$package /usr/doc/$package
fi
fi
done
manoj
--
"Bureaucracy is a giant mechanism operated by pygmies." Honore de
Balzac
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
Reply to: