aaronmgriffin at gmail.com
Sat Dec 29 01:48:05 EST 2007
On Dec 23, 2007 6:09 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> On Dec 23, 2007 1:08 PM, Xavier <shiningxc at gmail.com> wrote:
> > Allan McRae wrote:
> > > Hi,
> > >
> > > I was looking at FS#7155 (http://bugs.archlinux.org/task/7155) which I
> > > believe to be fixed now but during then I notice some left overs from
> > > what appears to be a rewrite of the md5sum checking.
> > >
> > > In the bug report, it was asking for more information than "error:
> > > failed to commit transaction (invalid or corrupted package)". Trying to
> > > look at this I noticed that the "invalid of corrupted package" part can
> > > only generated by alpm_pkg_checkmd5sum() which is not used anywhere.
> > > The "error: failed to commit transaction" part is generated by
> > > sync_trans() if alpm_trans_commit() fails which in this case can be
> > > followed through to test_md5sum() failing. So it looks like md5sum
> > > checking was overhauled at some stage.
> > >
> > > So my question is: Is alpm_pkg_checkmd5sum() a leftover of the past and
> > > need removing?
> > >
> > I guess so, I didn't find yet when its usage was removed, but I at least
> > found when it was introduced.
> > It was first used in src/pacman/sync.c , with commit b708e448ea3 .
> It may not be used by our pacman front end, but note that it is a
> publicly available library function so could be used by other
> frontends or users of libalpm. With that in mind, does it seem smart
> to remove it? A quick glance at what it does seems to indicate it
> could be useful to verify integrity of packages in the sync cache
> without having to start a transaction.
I vote for keeping it. It's doing no harm
More information about the pacman-dev