After some investigation, I believe the problem is that we added some new entries to landscape-client.templates, which are not there in the released version of landscape-client. Apparently when you upgrade the released version to this new one, these new entries don't really get picked by landscape-client.postinst, in particular there won't be the default "900" value for exchange_interval, hence breaking landscape-config.
I think what we are doing is basically good, however I'd suggest to make it so that we don't always blindly re-write an existing landscape.conf file in landscape-client.postinst, but we just do it if we actually notice that there are some changes. So that means either we are shipping in the new version some new conf values that *must* be in the landscape.conf file (very rare situation, probably never happened), or the user is running dpkg-reconfigure (the common use case).
We might also consider adding something like:
###################################################
# This file is managed by debconf, DO NOT EDIT IT MANUALLY, please run
# dpkg-reconfigure landscape-client instead
###################################################
to the auto-generated landscape.conf, as it seems to be an established practice.
After some investigation, I believe the problem is that we added some new entries to landscape- client. templates, which are not there in the released version of landscape-client. Apparently when you upgrade the released version to this new one, these new entries don't really get picked by landscape- client. postinst, in particular there won't be the default "900" value for exchange_interval, hence breaking landscape-config.
After looking at:
http:// www.debian. org/doc/ debian- policy/ ap-pkg- conffiles. html
and
http:// www.debian. org/doc/ debian- policy/ ch-binary. html#s- maintscriptprom pt
I think what we are doing is basically good, however I'd suggest to make it so that we don't always blindly re-write an existing landscape.conf file in landscape- client. postinst, but we just do it if we actually notice that there are some changes. So that means either we are shipping in the new version some new conf values that *must* be in the landscape.conf file (very rare situation, probably never happened), or the user is running dpkg-reconfigure (the common use case).
We might also consider adding something like:
####### ####### ####### ####### ####### ####### ####### ## ####### ####### ####### ####### ####### ####### ##
# This file is managed by debconf, DO NOT EDIT IT MANUALLY, please run
# dpkg-reconfigure landscape-client instead
#######
to the auto-generated landscape.conf, as it seems to be an established practice.