Comment 3 for bug 830492

Revision history for this message
Julian Andres Klode (juliank) wrote :

> This could be solved be checking the cache just after locking for install.
Not at all. Synaptic requires more information then found in the cache, and it needs the database on the system, that is, /var/lib/dpkg/status and other lists to not change in order to be able to display the information correctly. Otherwise, it tries reading at the wrong offset in the file and who knows what happens then.

> This would prevent 2 applications from downloading the same file.
Yes, but you still have the file in the download lists in both runs. The problem here is that you can't display correct progress information anymore and would have to wait until the other process finishes the download and you probably can't download something else in between, without major changes.

On the other things, it's just too complicated to lock for installation, then regenerate the cache and transfer the modifications to the new cache (you'd need to correctly map from the old cache to the new one). Then you might even notice that you need to download some more packages, because someone removed packages while you downloaded, etc. In Summary: It's just too complicated to do right.