X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0a778f71f935900ff8a90a958f0e7da700d84f9f..0fb16c3e678044d6d06ba8a6199b1e96487ee0d8:/cmdline/apt-cache.cc?ds=sidebyside diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index f68e739b1..0d7425c48 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -172,7 +172,8 @@ static void ShowHashTableStats(std::string Type, cout << "Total buckets in " << Type << ": " << NumBuckets << std::endl; cout << " Unused: " << UnusedBuckets << std::endl; cout << " Used: " << UsedBuckets << std::endl; - cout << " Average entries: " << Entries/(double)NumBuckets << std::endl; + cout << " Utilization: " << 100.0 * UsedBuckets/NumBuckets << "%" << std::endl; + cout << " Average entries: " << Entries/(double)UsedBuckets << std::endl; cout << " Longest: " << LongestBucket << std::endl; cout << " Shortest: " << ShortestBucket << std::endl; } @@ -379,7 +380,7 @@ static bool Dump(CommandLine &) std::cout << " Size: " << F->Size << std::endl; std::cout << " ID: " << F->ID << std::endl; std::cout << " Flags: " << F->Flags << std::endl; - std::cout << " Time: " << TimeRFC1123(F->mtime) << std::endl; + std::cout << " Time: " << TimeRFC1123(F->mtime, true) << std::endl; std::cout << " Archive: " << DeNull(F.Archive()) << std::endl; std::cout << " Component: " << DeNull(F.Component()) << std::endl; std::cout << " Version: " << DeNull(F.Version()) << std::endl; @@ -1100,7 +1101,7 @@ static bool GenCaches(CommandLine &) return CacheFile.BuildCaches(&Progress, true); } /*}}}*/ -bool ShowHelp(CommandLine &) /*{{{*/ +static bool ShowHelp(CommandLine &) /*{{{*/ { std::cout << _("Usage: apt-cache [options] command\n" @@ -1115,7 +1116,7 @@ bool ShowHelp(CommandLine &) /*{{{*/ return true; } /*}}}*/ -std::vector GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {"gencaches",&GenCaches, nullptr}, @@ -1141,8 +1142,6 @@ std::vector GetCommands() /*{{{*/ /*}}}*/ int main(int argc,const char *argv[]) /*{{{*/ { - InitLocale(); - // Parse the command line and initialize the package library CommandLine CmdL; auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_CACHE, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);