Postinsts and other control files should on the whole be really simple.
This post seems to be more about protecting users from accidental problems with package installation scripts, but not about deliberate problems with packages, nor accidental problems with packages post installation script.
When I take an untrusted .deb, I look inside at the files it's dumping out, and the scripts it's going to run. Making apt more declarative wouldn't stop that.
> Wouldn't it be neat if such an atrocity wasn't possible?
An easier way might be to make it difficult for users to install "unofficial packages", but that would be against the philosophy of users having ultimate control over their systems.
Your suggestion puts us in the rather interesting situation that you're requesting a new feature for something that primarily affects third party packages that aren't actually supported in the first place.
I recall that episode made some noise at the time...
a) the ass-backwards approach the company took to building a package manager.
b) the new development paradigm of "fuck it, find a library". Flying Spaghetti monster forbid these hipster developers actually have to write some fucking code themselves, its easier just to duct-tape together 200 different 'libraries', half of which do what you could do in 5 lines or less, and produces a dependency tree like fucking crab grass.
All praise his noodleness.
It's just like how you need software like Revo Uninstaller on Windows to actually clean up everything: why?
It might not cause you day-to-day problems, but it's a massive defect in my eyes.