Extended fix for bug#9666 Installing an invalid package cause an server error on package manager.