Closed nilxam closed 8 months ago
IMO even that is wrong in some cases. Given prj and pkg, there are three ways to get "maintainers":
/source/prj/pkg/_meta
with fallbacks to prj, parent prj, .../search/owner?package=pkg
/search/owner?binary=pkg
(does not make sense at all?)And there's also /search/owner?project=prj&package=pkg
which might or might not be equivalent to 1?
IMO even that is wrong in some cases. Given prj and pkg, there are three ways to get "maintainers":
/source/prj/pkg/_meta
with fallbacks to prj, parent prj, .../search/owner?package=pkg
/search/owner?binary=pkg
(does not make sense at all?)
Perhaps it makes sense in other usecases, like maintenance to check does the binary is maintained. That is not the case for check_source though. This change doesn't change the behavior for other usecases, only check_sources going to use mode=package
.
And there's also
/search/owner?project=prj&package=pkg
which might or might not be equivalent to 1?
It does. It give a result of prj, parents prj until the top one per the given prj
.
Interesting that, osc maintainer PKG
triggers /search/owner?package=PKG
, however osc maintainer PRJ PKG
triggers /source/PRJ/PKG/_meta
, it sounds like if a particular PRJ was to give(like in check_sources we find devel project already) then use package_role_expand()
is a better option here.
lets move back to https://github.com/openSUSE/openSUSE-release-tools/pull/3041 then
The use case is too different between global package search, global binary search and prj/pkg lookup, so IMO separate methods would be clearer.
owner()
supports two search mode: binary and package, the default one isbinary
, in some cases we should searchpackage
instead like for source checker.The difference in API call is
/search/owner?package=xxx
vs./search/owner?binary=xxx
, try with livecd-openSUSE on binary search mode it gives empty collection since there is no binary matches livecd-openSUSE, with the package search mode, it gives the right result as searched by package name.