* '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
This commit is contained in:
@@ -15,8 +15,11 @@
|
|||||||
#include <ObjectList.h>
|
#include <ObjectList.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
|
||||||
|
#include <package/RepositoryCache.h>
|
||||||
#include <package/RepositoryConfig.h>
|
#include <package/RepositoryConfig.h>
|
||||||
|
#include <package/PackageInfo.h>
|
||||||
#include <package/PackageRoster.h>
|
#include <package/PackageRoster.h>
|
||||||
|
#include <package/RepositoryInfo.h>
|
||||||
|
|
||||||
#include "pkgman.h"
|
#include "pkgman.h"
|
||||||
|
|
||||||
@@ -95,9 +98,32 @@ command_list_repos(int argc, const char* const* argv)
|
|||||||
WARN(result, "skipping repository-config '%s'", path.Path());
|
WARN(result, "skipping repository-config '%s'", path.Path());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf(" %s %s\n",
|
if (verbose && i > 0)
|
||||||
|
printf("\n");
|
||||||
|
printf(" %s %s\n",
|
||||||
repoConfig.IsUserSpecific() ? "[User]" : " ",
|
repoConfig.IsUserSpecific() ? "[User]" : " ",
|
||||||
repoConfig.Name().String());
|
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<no repository cache found>\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user