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.
> });
> }
>
diff --git infrastructure/lib/OpenBSD/PortGen/Utils.pm
infrastructure/lib/OpenBSD/PortGen/Utils.pm
index 16f901a3c9d..a7ce7981f7a 100644
--- infrastructure/lib/OpenBSD/PortGen/Utils.pm
+++ infrastructure/lib/OpenBSD/PortGen/Utils.pm
@@ -62,11 +62,11 @@ 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)
+ ORDER BY LENGTH(_PkgPaths.FullPkgPath)
});
}