[Aptitude-devel] Bug#836567: Bug#836567: aptitude: [PATCH] aborts on encountering new DepCompareOp flags

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Thu Feb 16 22:50:47 UTC 2017


Control: tags -1 + pending


2016-09-18 12:09 David Kalnischkies:
>On Sat, Sep 17, 2016 at 10:32:53PM -0400, Aaron M. Ucko wrote:
>> > On a first glance, using the module operator rather than bitwise
>> > operations looks a bit odd.
>>
>> It's unconventional, but should optimize to bitwise masking in practice
>> because the modulus is a constant power of two.  Using an explicit mask
>> would be cleaner, but AFAICT apt's headers don't predefine one.
>
>From the apt side I can confirm that I 'recently' added new flags
>(specifically in 8c7af4d4 on Thu Jul 16 11:15:25 2015).

After discussing this a bit more with David, I decided to change a bit
the patch and use 0xf as mask, because the enum documents that only the
lower 4 bits are to be used as an operator.

In practice the %-operation would probably achieve the same, but I think
that this way is easier to understand.

Patch attached.  I will try to get it into the next release.

Aaron, it would be great if you could test it and check that it fixes
the problem.  I never stumbled upon this problem, even if I use
multi-arch in most of my systems.


Thanks.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-a-more-strict-mask-for-comparison-of-dependency-.patch
Type: text/x-diff
Size: 2584 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20170216/76349063/attachment.patch>


More information about the Aptitude-devel mailing list