On Sat, Apr 18, 2020 at 05:21:14AM +0200, Thomas L. wrote: > On Sat, 18 Apr 2020 04:30:50 +0200 > "Thomas L." <[email protected]> wrote: > > diff --git infrastructure/lib/OpenBSD/PortGen/Utils.pm > > infrastructure/lib/OpenBSD/PortGen/Utils.pm index > > 16f901a3c9d..0dc18d0a592 100644 --- > > infrastructure/lib/OpenBSD/PortGen/Utils.pm +++ > > infrastructure/lib/OpenBSD/PortGen/Utils.pm @@ -62,10 +62,10 @@ sub > > _module_sth } ) or die "failed to connect to database: $DBI::errstr"; > > > > return $dbh->prepare(q{ > > - SELECT _Paths.FullPkgPath FROM _Paths > > - JOIN _Ports ON _Paths.PkgPath = _Ports.FullPkgPath > > + SELECT _PkgPaths.FullPkgPath FROM _Paths AS _PkgPaths > > + JOIN _Paths ON _Paths.PkgPath = _PkgPaths.Id > > + JOIN _Ports ON _Ports.FullPkgPath = _Paths.Id > > WHERE PKGSTEM = ? > > - AND _Paths.Id = _Paths.PkgPath > > ORDER BY LENGTH(_Paths.FullPkgPath) > > The ORDER BY should use _PkgPaths, too. Updated patch below. > > > }); > > } > > It's very likely to miss a canonical at least.
Specifically, _Ports.FullPkgPath is not guaranteed to match every _Paths.Id the _Ports table get canonicalized to save space and avoid duplicates.
