[pacman-dev] Bug with rxvt-unicode version check
Xavier
shiningxc at gmail.com
Thu Nov 22 05:32:11 EST 2007
On Thu, Nov 22, 2007 at 11:19:58AM +0100, Xavier wrote:
> On Thu, Nov 22, 2007 at 01:45:29AM +0100, bardo wrote:
> > Hi all.
> >
> > I'm experiencing a strange problem: rxvt-unicode should be upgraded
> > from 8.4-1 to 8.5a-1, but when it comes the time of checking if the
> > package has been cached, 8.4-1 is marked as a match, and gets
> > installed instead of the new version. I can reproduce this whenever I
> > want, since pacman tries to upgrade rxvt-unicode with every -Su.
> >
> > The relevant part of pacman -Syu --debug is attached, I can upload the
> > whole log if needed (~750KB).
> >
> >
> > Corrado
>
> This problem already happened. It's not a bug in pacman.
> It's either an user (well, developer) mistake, or a bug in the repo scripts.
>
> cat /var/lib/pacman/sync/extra/rxvt-unicode-8.5a-1/desc
> %FILENAME%
> rxvt-unicode-8.4-1-i686.pkg.tar.gz
>
Hm. this is not a pacman bug, but maybe pacman could have more sanity checks.
Maybe it could check that the FILENAME contains VERSION.
In the above case, it was :
%VERSION%
8.5a-1
Or once the package has been downloaded, it could also check its .PKGINFO,
and see that the version still match.
I think the first check should be quite easy, something like
strstr(pkg->filename. pkg->version).
But I don't know about the second.
In any cases. isn't it the repo scripts that should be safer to prevent these
problems in the first place?
More information about the pacman-dev
mailing list