HaikuDepot / PackageKit: Repositories 'Identifier' URL

Repositories are identified with a 'url' in the
remote 'repo.info' file.  There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on.  There is some confusion between these
two terms in the source.  This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so.  Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.

Fixes #13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1
This commit is contained in:
Andrew Lindesay
2018-07-05 20:06:54 +00:00
committed by Kacper Kasper
parent a00c8c4491
commit 3b17d8dd7f
21 changed files with 314 additions and 84 deletions
+2 -1
View File
@@ -69,7 +69,8 @@ struct RepositoryContentListHandler : BRepositoryContentHandler {
printf("repository-info:\n");
printf("\tname: %s\n", repositoryInfo.Name().String());
printf("\tsummary: %s\n", repositoryInfo.Summary().String());
printf("\turl: %s\n", repositoryInfo.OriginalBaseURL().String());
printf("\tbase-url: %s\n", repositoryInfo.BaseURL().String());
printf("\turl: %s\n", repositoryInfo.URL().String());
printf("\tvendor: %s\n", repositoryInfo.Vendor().String());
printf("\tpriority: %u\n", repositoryInfo.Priority());
printf("\tarchitecture: %s\n",
+5 -2
View File
@@ -104,6 +104,7 @@ ListReposCommand::Execute(int argc, const char* const* argv)
repoConfig.IsUserSpecific() ? "[User]" : " ",
repoConfig.Name().String());
printf("\t\tbase-url: %s\n", repoConfig.BaseURL().String());
printf("\t\turl: %s\n", repoConfig.URL().String());
printf("\t\tpriority: %u\n", repoConfig.Priority());
if (verbose) {
@@ -118,8 +119,10 @@ ListReposCommand::Execute(int argc, const char* const* argv)
repoCache.Info().Architecture()]);
printf("\t\tpkg-count: %" B_PRIu32 "\n",
repoCache.CountPackages());
printf("\t\torig-url: %s\n",
repoCache.Info().OriginalBaseURL().String());
printf("\t\tbase-url: %s\n",
repoCache.Info().BaseURL().String());
printf("\t\turl: %s\n",
repoCache.Info().URL().String());
printf("\t\torig-prio: %u\n", repoCache.Info().Priority());
} else
printf("\t\t<no repository cache found>\n");