[pacman-dev] INFRQ_* confusion

Aaron Griffin aaronmgriffin at gmail.com
Thu Mar 1 16:11:06 EST 2007


On 3/1/07, Dan McGee <dpmcgee at gmail.com> wrote:
> On 2/28/07, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> > On 2/28/07, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
> > > On 2/28/07, Nagy Gabor <ngaba at petra.hos.u-szeged.hu> wrote:
> > > > As I see, the author thinks of inforeq as exactly one bit is set to 1.
> > > > However, if inforeq=0xFF and infolevel!=0, this is a bug. And if
> > > > inforeq=0, this condition is never true.
> > >
> > > There is a bug here, but it's not what you're explaining.
> > > info->infolevel is |= to the new inforeq flags.  This makes the and
> > > process work UNLESS infolevel is a composite (more than one flag).
> > >
> > > The real bug is here:
> > > - if(info->infolevel & inforeq) {
> > > + if(inforeq ^= (info->infolevel & inforeq)) {
> > >
> > > for example:
> > > info->infolevel == 1011
> > > inforeq == 0111
> > > & result == 0011 (so something is already loaded)
> > > ^= result == 0100 (exactly what we want, the missing piece)
> > >
> >
> > Ack, the if() condition needs to be reversed too, if(!...)
>
> Does this still need following up on?

No, I'm going to take care of it tonight with a bunch of other INFRQ
related changes.




More information about the pacman-dev mailing list