[pacman-dev] Disk space checking branch "complete"
Allan McRae
allan at archlinux.org
Mon Nov 15 18:33:16 CET 2010
Hi,
I have "finished" the disk space checking implementation.
The only TODO left is to add the statvfs version of getmntinfo code path
(NetBSD), but otherwise I consider this done.
The calculations done are quite good but it is near impossible to be
exact (e.g. adding/removing a block for directories but only once across
the transaction, .pacsave/.pacnew files, filelist db files). I suppose
I could add a block for those and not remove blocks to get an upper
limit. However, the difference will likely be orders of magnitude
smaller than the transaction size so I am not sure it is worth further
effort...
As far as the interface goes, the check is performed only when the
CheckSpace option is given in pacman.conf. We also get a nice progress
bar in pacman while the check is being performed (think of what is
displayed during file conflict checking).
See the work here:
http://projects.archlinux.org/users/allan/pacman.git/diff/?h=diskspace&id2=working
I need to rebase that branch into useful commit(s), but the overall
changes are rather small (12 files changed, 447 insertions, 2 deletions
- with 365 of those additions being in two new files). So I think code
review can happen now.
I am looking for comments on code correctness and very specific
implementation details only. Anything other than that needs to be
submitted in patch form...
Allan
More information about the pacman-dev
mailing list