[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



On Tue, Aug 01, 2017 at 12:56:13PM +0200, Stéphane Glondu 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?

Does ben magically handle that as something other than a substring match? 
If so I haven't noticed this in practice.

> > 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)?

Yes, though this would only appear in build-depends and I haven't dealt with
any cases yet where that mattered.  But if you're auto-generating
build-depends and depends matches with the same rules, then for
completeness, < should be in the list of characters.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: PGP signature


Reply to: