On 11/11/10 07:29, Nezmer wrote:
On Wed, Nov 10, 2010 at 02:43:16PM -0600, Dan McGee wrote:
On Wed, Nov 10, 2010 at 1:16 PM, Eric BĂ©langer<snowmaniscool@gmail.com> wrote:
On Tue, Nov 9, 2010 at 10:47 PM, Allan McRae<allan@archlinux.org> wrote:
Hi,
I have implemented some basic disk space checking in pacman. The code is still a bit rough and there are some TODOs in there (especially related to output). But the basics are all there, so it seems time to get some comments.
I only glanced at the code so this might not be relevant.
-Does it work if you have other partitions like /usr, /var , etc... ?
-I like the idea of putting option in pacman.conf. If someone has an exotic partitionning scheme that makes pacman unable to calculate the actual disk space, then they can disable the disk space checking.
Your glance was much too quick. The whole point of this was to get rid of the dumbassness of "dur I have magic number size to hit" type checking. For this, you don't have to map partitions yourself, you don't do anything- it gets your partition map, figures out where each file is going to end up, sums up the necessary blocks per partition gained/lost (not even bytes which could still be wrong), and then finally decides whether the install can proceed.
-Dan
Good luck with that. If It eventually works, It would be great.
I made some minor changes to make Allan's code compile in FreeBSD. I'm not sure the changes I made were correct(After all, I don't know much beyond hello world in C). But with those changes pacman did not like my ZFS pool.
So, this code might only work in GNU or with only classic FSes.
This should be portable... although I have not tested on non-Linux systems yet. Any chance you want to give some actual error messages from the compilation? Or details of "did not like my ZFS pool"? Allan