On Mon, Feb 23, 2009 at 11:56 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Mon, Feb 23, 2009 at 1:47 AM, Brendan Hide <brendan@swiftspirit.co.za> wrote:
Again, this will be properly fixed as soon as pacman correctly takes into account the errors given when doing the actual deployment. Personally, I like the idea of adding sanity checks - but only if they're done properly. ;)
I wouldn't say that - we've talked about "proper transactions" for a long time, and are still nowhere near a proper solution. So don't expect this to be fixed soon, unless you're writing the patches :)
The problem with errors given during actual file operations is... what do we do when extracting a file fails? How do we return to normalcy? We can't. The best we can do is bail out, perhaps before updating the DB.
For instance, if I have foobar-1.0 installed, and upgrading to 1.1 fails due to disk space in the middle of the upgrade, what do we do? Do we leave foobar half upgraded and keep the DB entry at 1.0? This would allow us to reinstall foobar at the next upgrade when disk space is fixed, but leaves foobar in a possibly non-functioning state then. What happens if this is a critical package like, say, glibc. You can't clean up your disk space manually if glibc is borked and you can't even use "rm"
This is not an easy problem by any means as Aaron stated. A few other things: * Say we warn a user if they have less than 100 MB left. You already pointed out that doesn't work for some large packages. What if I have 180 GB left, but my /boot partition is super-low on space? It isn't like Windows where I pretty much need to check C:\ and that is it. * The current order of operations is download, remove 1 package, install 1 package, remove 1, install 1, ... Without making this a more atomic sequence, we can really run into problems. Whatever we do, we can't add in what we had before- that method was horrible. I do have two patches in my working branch dealing with space issues, but I'm not super happy with them: http://code.toofishes.net/cgit/dan/pacman.git/log/?h=working (see the top two patches). -Dan