[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#689537: pdnsd: deletes conffiles on package removal (policy 10.7.3): /etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd



With the prerm script gone this issue is fixed for squeeze->sid upgrades
(and squeeze->wheezy upgrades once 1.2.8-par-3 migrates to wheezy), but
the problem (missing conffile) will still exist if the user had any
version from 1.2.8-par-2, ..., 1.2.8-par-2.3 installed.

I don't see an easy solution for this ... as
  old-prerm upgrade new-version
is the very first step of the upgrade, there is no hacking around this
by deleting a buggy maintainer script during
  new-preinst upgrade old-version

Maybe this could work:
ship another copy of the file in /usr/share and in the postinst do

if dpkg --compare-versions $upgrade_from ge 1.2.8-par-2~ &&
   dpkg --compare-versions $upgrade_from lt 1.2.8-par-4~
then
  target=/etc/NetworkManager/dispatcher.d/002_NetMan_pdnsd
  source=/usr/share/.../002_NetMan_pdnsd
  if [ ! -e $target ]; then
    echo restoring $target
    cp $source $target
  fi
fi

but it's only upgrades from pdnsd/testing that are affected


Andreas


Reply to: