Added dpkg state management