Hello; The categories in Haiku Depot (HD) are retrieved from Haiku Depot Server (HDS) using an API. HDS stores these in its own database. You can see the data structure here; look for pkg_supplicant
, pkg_pkg_category
and pkg_category
. There are APIs to get this data out;
- Get reference data including the package categories
- Get all package version data including assignment to package categories.
- There are also RPC calls that can be made to get specific data. These are described as Open-API specifications.
The assignment of categories to packages is generally administered by certain users in HDS using the user interface.
This data is not coming from the HPKR / HPKG files at this time. The advantage of this approach is that the categories and data can be changed in HDS and then they will go out to the HD clients and the web interface straight away globally. Once this data is encoded into the HPKR / HPKG files it will be significantly more difficult or even impossible to reclassify the packages at a later date. I think it is best to stick with the current arrangement with regard to the data.
HD does currently hold this reference data and information in files locally at ~/config/cache/HaikuDepot
. HD updates the data as new or updated data is available. One way this data could be shared would be for this data to instead be managed by a local operating system server that HD and other applications communicate with, but implementing that would be quite a bit of work.