Re: ruby-state-machine and ruby-state-machines
* Cédric Boutillier <boutil@debian.org> [160703 23:19]:
> By the way, does anyone have a ready magic
> incantation to get a list of leaf Ruby packages. Maybe there are several
> (dozens!) of old dependencies that are not used anymore and could go
> away...
So this is not the fastest query ever (takes ~90sec for me), but
this works:
WITH
sidpkgs AS (
select distinct
p1.package, p1.maintainer,
regexp_split_to_array(replace(regexp_replace(p1.depends, E'(\\([^\\)]+\\))', '', 'g'), ' ', ''), E'[,|]') as depends,
regexp_split_to_array(replace(regexp_replace(p1.recommends, E'(\\([^\\)]+\\))', '', 'g'), ' ', ''), E'[,|]') as recommends,
regexp_split_to_array(replace(regexp_replace(p1.suggests, E'(\\([^\\)]+\\))', '', 'g'), ' ', ''), E'[,|]') as suggests
from packages p1
where p1.release = 'sid'
and p1.package not like '%-dbgsym'
and p1.version = (select max(version) from packages p2 where p2.package = p1.package and p2.release = 'sid')
),
ourpkgs AS (
select package from sidpkgs where maintainer like '%pkg-ruby-extras%'
)
select p.package
from ourpkgs p
left join sidpkgs p2 on p.package = any(p2.depends)
or p.package = any(p2.recommends)
or p.package = any(p2.suggests)
where p2.package is null;
(To be run against the UDD database, which you can access from many
debian.org machines.)
--
,''`. Christian Hofstaedtler <zeha@debian.org>
: :' : Debian Developer
`. `' 7D1A CFFA D9E0 806C 9C4C D392 5C13 D6DB 9305 2E03
`-
Reply to: