Hi,

I have to update 4 debian/*.preinst files.


Right now the files are like here[0]:


|

if dpkg --compare-versions "$2" lt "1.2.4+dfsg1-7" ; then
   rm -rf /usr/share/doc/bogofilter || true
fi [0] -
https://anonscm.debian.org/git/collab-maint/bogofilter.git/tree/debian/bogofilter.preinst
This approach has problems on an upgrade from Jessie to Stretch[1].The
recommendation today is to use 'dpkg-maintscript-helper', so I should
change to ("a real directory is switched to a symlink"): [1] -
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832291 if
dpkg-maintscript-helper supports dir_to_symlink 2>/dev/null; then
dpkg-maintscript-helper dir_to_symlink \ /usr/share/doc/bogofilter
bogofilter 1.2.4+dfsg1-8 bogofilter -- "$@" fi From the manpage:
"pathname(/usr/share/doc/bogofilter here) is the absolute name of the
old directory (the path will be a symlink at the end of the
installation) and new-target (bogofilter here) is the target of the new
symlink at pathname. It can either be absolute or relative to the
directory containing pathname." But the symlink is created by
dh_installdocs[1] already. I just want to remove the directory. [1] -
'dh_installdocs --link-doc=bogofilter-common' The manpage again:
COMMANDS AND PARAMETERS supports command rm_conffile conffile
[prior-version [package]] mv_conffile old-conffile new-conffile
[prior-version [package]] symlink_to_dir pathname old-target
[prior-version [package]] dir_to_symlink pathname new-target
[prior-version [package]] What should I do ? Regards, Herbert

|

Reply via email to