From ead4d20c7a838a2c333fd3c39d085a5c9e437fdd Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 15 Feb 2011 15:48:02 +0000 Subject: [PATCH] * 'pkgman list-repo -v' now shows more detailed info (from repo-cache) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40510 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/pkgman/command_list_repos.cpp | 28 ++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/bin/pkgman/command_list_repos.cpp b/src/bin/pkgman/command_list_repos.cpp index cbdca698de..d7d1b5c6c4 100644 --- a/src/bin/pkgman/command_list_repos.cpp +++ b/src/bin/pkgman/command_list_repos.cpp @@ -15,8 +15,11 @@ #include #include +#include #include +#include #include +#include #include "pkgman.h" @@ -95,9 +98,32 @@ command_list_repos(int argc, const char* const* argv) WARN(result, "skipping repository-config '%s'", path.Path()); continue; } - printf(" %s %s\n", + if (verbose && i > 0) + printf("\n"); + printf(" %s %s\n", repoConfig.IsUserSpecific() ? "[User]" : " ", repoConfig.Name().String()); + printf("\t\tbase-url: %s\n", repoConfig.BaseURL().String()); + printf("\t\tpriority: %u\n", repoConfig.Priority()); + + if (verbose) { + BRepositoryCache repoCache; + result = roster.GetRepositoryCache(repoName, &repoCache); + if (result == B_OK) { + printf("\t\tvendor: %s\n", + repoCache.Info().Vendor().String()); + printf("\t\tsummary: %s\n", + repoCache.Info().Summary().String()); + printf("\t\tarch: %s\n", BPackageInfo::kArchitectureNames[ + repoCache.Info().Architecture()]); + printf("\t\tpkg-count: %lu\n", repoCache.PackageCount()); + printf("\t\torig-url: %s\n", + repoCache.Info().OriginalBaseURL().String()); + printf("\t\torig-prio: %u\n", repoCache.Info().Priority()); + + } else + printf("\t\t\n"); + } } return 0;