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

Re: [GSoC] blends-gen-control hints (Was: blends-dev, gsoc 2013)



On Thu, Jul 11, 2013 at 03:01:21PM +0200, Andreas Tille wrote:
> On Thu, Jul 11, 2013 at 02:47:19PM +0200, Andreas Tille wrote:
> >     query = """PREPARE blend_check_existing_package_provides AS
> >                  SELECT DISTINCT provides, p.distribution, component, r.sort FROM packages p
> >                  JOIN releases r ON p.release = r.release
> >                  WHERE provides ~ ('[ ,]*'||$1||'[ ,]*')
> >                  ORDER BY r.sort DESC
> >                  LIMIT 1"""
> 
> I think 
> 
>     provides ~ ('\b'||'freeb'||'\b');

Damn:

udd=# SELECT DISTINCT provides, p.distribution, component, r.sort FROM packages p
                 JOIN releases r ON p.release = r.release
                 WHERE provides ~ ('\b'||'djvu-viewer'||'\b');
 provides | distribution | component | sort 
----------+--------------+-----------+------
(0 Zeilen)


While we get no false positives like freeb we also do not get what we
really want to catch. :-(

Keep on thinking what regexp will fetch those *real* virtual packages.

If all else fails we need to create a function that turns the string
into an array and then query the array ...

Any idea?

     Andreas.

-- 
http://fam-tille.de


Reply to: