[pacman-dev] %SIZE%, %CSIZE%, %ISIZE%

Nagy Gabor ngaba at bibl.u-szeged.hu
Tue Nov 27 07:34:03 EST 2007


Idézés Aaron Griffin <aaronmgriffin at gmail.com>:

> On Nov 23, 2007 3:57 PM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
> > Patch attached.
> >
> > Notes:
> > 1. 'Compressed size' is ugly [too long, no space before :], improvements
> > welcome
> > 2. The following commit is misleading in case of sync packages (isize == 0
> > means isize is not filled in, not isize == csize):
> > http://projects.archlinux.org/git/?
> > p=pacman.git;a=commit;h=5e12d3dec99e7a506683cf625fa4344f57df0b77
> 
> This looks fine to me - Dan, opinions?
> 

There is something I wasn't sure: is 'Packager: None' OK? (so 'None' for empty
string, not 'Unknown' <- to follow list_display-style)

Well, the 3 fields in the subject are not crucial at all, as I see:
They are used with --info and in messages only.

But the current implementation of them is quite chaotic. I would prefer use only
csize and isize in the code and %CSIZE%, %ISIZE% in the db backends.
The new pacman installscript will sed localdb to remove %REQUIREDBY%, so this is
a good time to do s/%SIZE%/%ISIZE%/ too.

Or maybe the problem is here:
/* NOTE: the CSIZE and SIZE fields both share the "size" field ...*/
This is simply odd. We win sizeof(int) bytes for each packages (however, we use
fixed-size strings) in pmpkg_t. I could accept this to simplify pkg_get_[i]size,
but sharing ISIZE and SIZE would be much more plausible imho.

Bye


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/





More information about the pacman-dev mailing list