[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#870319: ben: Please make generated simple query match the set of exact package names



Hi Stéphane,

On Tue, Aug 1, 2017 at 12:56 PM, Stéphane Glondu <glondu@debian.org> wrote:
> On 01/08/2017 02:00, Steve Langasek wrote:
>> I believe the provided patch is inaccurate because it doesn't handle the
>> case of a given package name appearing at the very beginning or the very end
>> of the dependency list.
>>
>> The syntax that I have used for transition trackers in Ubuntu that works
>> reliably is:
>>
>>   /(^| )(list|of|packages)\s*([,(:]|$)/
>
> So you don't use the .depends ~ "foo|bar" syntax, right?
>
>> Note that ^ and $ do not work as part of a character class in the regexp
>> implementation used by ben, the last time I checked.
>>
>> Breaking this down, we have:
>>
>>  - either the beginning of the dependency list or a space
>>  - the package name
>>  - optional whitespace
>>  - either the end of the dependency list, or one of the characters [,(:]
>>
>> The three possible terminating characters are for: a bare dependency
>> followed by another ("libevent-0.2-5, [...]"); a versioned dependency
>> ("libevent-0.2-5 (>= [...])"; and a multiarch dependency
>> ("libevent-0.2-5:any").
>
> Isn't there also "<" (for build profiles)?

There is but i think we can expect a " " before it (like with "(").
Adding it to the regex does not hurt much OTOH.

Cheers,
Balint


Reply to: