Haiku Update; Repository Mirror Handling
Mirrors
Identifying a repository of packages can be more complex than it initially seems. Haiku maintains some meta-data about the repositories that are configured on a given installation. HaikuDepot also knows about repositories that exist in the HaikuDepotServer system. Somehow these two sets of repositories need to be married together so that server data can be correlated to local data.
When adding a repository to a Haiku system, a base URL is specified such as;
https://cdn.haiku.nz/haikuports/x86_gcc2/current
The Haiku system will then download a file repo.info
from the remote system to find out more about the repository. An example of such a file’s contents would be;
name HaikuPorts
vendor "Haiku Project"
summary "The HaikuPorts repository"
priority 1
url https://vmpkg.haiku-os.org/haikuports/master/repository/x86_gcc2
architecture x86_gcc2
Here the name and role of the url
field has been historically somewhat confusing. This field should be treated as a unique identifier for the repository. All mirrors of this repository should have the same url
value and so this url
field could and should be used as unique identifier for the repository.
In late 2017 I have added a module to HaikuDepotServer to read this file-format properly and to incorporate the url
field into the HaikuDepotServer storage and processing. The url
is then fed back to clients when they bulk-download the list of repositories. HaikuDepotServer will read the repo.info
file each time it synchronizes repository data into its database.
More recently, I have changed the actual network-access URL name to BaseURL
through the C++ code and have made sure that the URL
now refers consistently to the url
from the repo.info
file. The HaikuDepot desktop application how uses this URL
field together with the downloaded information HaikuDepotServer in order to correlate the repositories.
Now the HaikuDepotServer repositories and the local repositories can key themselves on this field and mirrors can be properly used in the platform.
User Ratings
The user-ratings window has been improved and a number of bugs have been resolved in this space at the same time.