[Yum-devel] [PATCH 2/2] Remove the extra seconds in the .sqlite loading (sucks to be apt ; )
Tim Lauridsen
tim.lauridsen at googlemail.com
Fri Jan 29 18:56:57 UTC 2010
On Fri, Jan 29, 2010 at 7:28 PM, James Antill <james at and.org> wrote:
> ---
> yum/sqlitesack.py | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
> index 8452526..c0b6104 100644
> --- a/yum/sqlitesack.py
> +++ b/yum/sqlitesack.py
> @@ -331,7 +331,14 @@ class YumAvailablePackageSqlite(YumAvailablePackage,
> PackageObject, RpmBase):
> # Check count(pkgId) here, the same way we do in searchFiles()?
> # Failure mode is much less of a problem.
> for ob in cur:
> - c_date = ob['date']
> + # Note: Atm. rpm only does days, where (60 * 60 * 24) ==
> 86400
> + # and we have the hack in _dump_changelog() to keep
> the
> + # order the same, so this is a quick way to get rid
> of
> + # any extra "seconds".
> + # We still leak the seconds if there are 100 updates
> in
> + # a day ... but don't do that. It also breaks if rpm
> ever
> + # gets fixed (but that is unlikely).
> + c_date = 100 * (ob['date'] / 100)
> c_author = to_utf8(ob['author'])
> c_log = to_utf8(ob['changelog'])
> result.append((c_date, _share_data(c_author), c_log))
> --
> 1.6.6
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>
Creepy too :)
ACK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20100129/f2eaed0c/attachment-0001.htm>
More information about the Yum-devel
mailing list