1 create view syncconflicts as
5 select path, count(distinct
6 printf('%s:%s:%s:%s', PFA.filetype, PFA.mode, PFA.username, PFA.groupname)) as mdcount,
7 count(distinct PFA.hash) as hashcount
10 on PA.package = PFA.package and PA.version = PFA.version and PA.release = PFA.release
11 where PA.status in ('installing', 'installed')
13 having (count(distinct printf('%s:%s:%s:%s', PFA.filetype, PFA.mode, PFA.username, PFA.groupname)
14 ) > 1 or count(distinct PFA.hash) > 1)
17 printf('%s-%s-%s', PFH.package, PFH.version, PFH.release) as pkgid,
18 printf('%s:%s:%s:%s', PFH.filetype, PFH.mode, PFH.username, PFH.groupname) as mds,
22 on PA.package = PFH.package and PA.version = PFH.version and PA.release = PFH.release
23 where path in (select path from md_conflict where hashcount > 1)
24 and PA.status in ('installing', 'installed')
27 printf('%s-%s-%s', PFM.package, PFM.version, PFM.release) as pkgid,
28 printf('%s:%s:%s:%s', PFM.filetype, PFM.mode, PFM.username, PFM.groupname) as mds,
32 on PA.package = PFM.package and PA.version = PFM.version and PA.release = PFM.release
33 where path in (select path from md_conflict where hashcount > 1)
34 and PA.status in ('installing', 'installed')