On Wed, Aug 10, 2016 at 15:53:44 +0200, Julien Cristau wrote:

> projectb=> select source.id, source.source, source.version, source.file, 
> component.name from source join files_archive_map fam on source.file = 
> fam.file_id join component on component.id = fam.component_id where 
> source.source = 'chocolate-doom' and source.version = '2.2.1-3';
>    id   |     source     | version |   file   |  name   
> --------+----------------+---------+----------+---------
>  499556 | chocolate-doom | 2.2.1-3 | 14121338 | main
>  499556 | chocolate-doom | 2.2.1-3 | 14121338 | contrib
> (2 rows)
> 
This now affects a second source package:

projectb=> select source.source, source.version, c1.name, c2.name from source, 
files_archive_map fam1, files_archive_map fam2, component c1, component c2 
where source.file = fam1.file_id and source.file = fam2.file_id and 
fam1.component_id = c1.id and fam2.component_id = c2.id and c1.id < c2.id;
     source     |   version    | name |  name   
----------------+--------------+------+---------
 linux-wlan-ng  | 0.2.9+dfsg-6 | main | contrib
 chocolate-doom | 2.2.1-3      | main | contrib
(2 rows)

Cheers,
Julien

Reply via email to