[pacman-dev] [PATCH] compute package download size outside _alpm_sync_prepare

Jonathan Conder j at skurvy.no-ip.org
Thu Mar 25 05:51:23 CET 2010


Hi

Here is a patch to resolve FS#18769. I created a new INFRQ/infolevel to
describe package download size, so that it could be lazily calculated
like most of the other package info. This differs slightly from most of
the other infolevels, which correspond to information actually read by
_alpm_db_read and alpm_pkg_load. However, I felt it better to do it this
way than setting the download size to -1 for invalid, as this would make
it the only field in pmpkg_t that needs to be initialized to something
other than 0.
It is also possible that the download size will be reported incorrectly
if a package download size is read, and then that same package is
downloaded with alpm_fetch_pkgurl. However, this is better than the
present situation where download sizes aren't reported at all, and
furthermore this is unlikely since alpm_fetch_pkgurl would probably not
be used to download a package that is in the repositories.

Thanks for your time,
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pm.patch
Type: text/x-patch
Size: 2907 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/pacman-dev/attachments/20100325/72ef8512/attachment.bin>


More information about the pacman-dev mailing list