(as I was asked to have a look – only reviewing based on comments and code in this bug through)
I guess setting the state explicit here is okay, I wonder why the package hasn't any state through – isn't that kinda normal for a package not touched at all? I also think it is wrong that .get_changes() returns packages in "non-interesting" states as those are clearly not changes. Basic sanity checking might be in order here to catch such issues in the future as e.g. a package from archive "now" (which is the designation for a package in the dpkg/status file) can realistically only be removed. APT has the test-bug-735967-lib32-to-i386-unavailable testcase which produces such a situation, the heisenstate doesn't seem to interest apt through and can't be easily observed. Maybe the tests should be extended to be able to call python – the ability could be handy as a CI test in general. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1550741 Title: Upgrade failed - unauthenticated package (module-init-tools) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1550741/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs