Comment 0 for bug 348681

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

We came across a situation in ls3 where the parent landscape-client environment had a DEBIAN_HAS_FRONTEND variable set. This came from a previous upgrade where landscape-client itself was upgraded and restarted, inheriting this variable from dpkg.

landscape-client should clean these variables on startup as they can mess up with subsequent package activities. In the ls3 case, dpkg got stuck. This was suggested:

<cjwatson> andreas: I think I would probably recommend iterating over the environment and unsetting anything that starts with DEBIAN_ or DEBCONF_
<cjwatson> if you want to be more selective, then DEBCONF_* plus DEBIAN_FRONTEND, DEBIAN_HAS_FRONTEND, DEBIAN_PRIORITY is a complete list

It was also mentioned that landscape-client should close the file descriptors it inherits. During normal startup it's not an issue, but it can become one when landscape-client upgrades itself.
<cjwatson> niemeyer: if a process inherits the fd that's for writing to debconf and doesn't close it on startup, then debconf will hang when it's trying to shut down
<cjwatson> niemeyer: so this isn't for future package installations using smart, it's something that landscape-client needs to do on startup if it's called from a postinst