Andreas Beckmann <a...@debian.org> writes: Hi,
> Package: waagent > Version: 1.2-1 > Severity: serious > User: debian...@lists.debian.org > Usertags: piuparts > > Hi, > > during a test with piuparts I noticed your package fails to remove. > >>From the attached log (scroll to the bottom...): > > Removing waagent ... > postrm called with unknown argument `remove' > dpkg: error processing waagent (--purge): > subprocess installed post-removal script returned error exit status 1 > Errors were encountered while processing: > waagent looks like the bug I already noticed while updating to 1.3.2 some weeks ago. Will confirm this by running piuparts on my side. > > The prerm script is entirely useless, there is no "prerm purge". ok. Will fix. > > For the postrm use > if [ "$1" = "purge" ] ; then ... fi > and avoid all the remaining boilerplate code and comments. ok > > The postinst I don't really get - why are there that many rm's on > configuration files? The files (for now) are created by waagent. This means: - if the package is removed (but not purged), we won't be able to purge it by using waagent -uninstall (since waagent will be gone) - iirc, if the package is removed & purged, the purge step will be called after the removal of waagent so, again, using waagent -uninstall won't work. So, the postrm script has to remove them "by hand". > > The configuration step via > waagent --setup --force > is not suitable for Debian systems, as it does not preserve user > modifications to the configuration files it creates, which is a > policy violation. > Try e.g. > dpkg-reconfigure waagent > after editing all the configuration files. The main problem is that I've seen any guaranty that the files created by the agent won't change. I can try to be clever and check if there's a waagent.conf file or the init script and in this case not run waagent --setup --force but I fear of the breakages it may creates. We have to be careful as the system running it is a Azure VM so if we break stuff, it may be hard to recover. Arnaud -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org