projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make it bzr-buildpackage able
[apt.git]
/
cmdline
/
apt-cache.cc
diff --git
a/cmdline/apt-cache.cc
b/cmdline/apt-cache.cc
index cc4c1559e2f74dc1bc35d6f1f7180d24ea32fe13..425df6994938890926ff8d42337a4eaa2e49ed0b 100644
(file)
--- a/
cmdline/apt-cache.cc
+++ b/
cmdline/apt-cache.cc
@@
-102,15
+102,13
@@
bool UnMet(CommandLine &CmdL)
if (End->Type != pkgCache::Dep::PreDepends &&
End->Type != pkgCache::Dep::Depends &&
End->Type != pkgCache::Dep::Suggests &&
if (End->Type != pkgCache::Dep::PreDepends &&
End->Type != pkgCache::Dep::Depends &&
End->Type != pkgCache::Dep::Suggests &&
- End->Type != pkgCache::Dep::Recommends &&
- End->Type != pkgCache::Dep::DpkgBreaks)
+ End->Type != pkgCache::Dep::Recommends)
continue;
// Important deps only
if (Important == true)
if (End->Type != pkgCache::Dep::PreDepends &&
continue;
// Important deps only
if (Important == true)
if (End->Type != pkgCache::Dep::PreDepends &&
- End->Type != pkgCache::Dep::Depends &&
- End->Type != pkgCache::Dep::DpkgBreaks)
+ End->Type != pkgCache::Dep::Depends)
continue;
// Verify the or group
continue;
// Verify the or group
@@
-244,7
+242,7
@@
bool DumpPackage(CommandLine &CmdL)
bool Stats(CommandLine &Cmd)
{
pkgCache &Cache = *GCache;
bool Stats(CommandLine &Cmd)
{
pkgCache &Cache = *GCache;
- cout << _("Total package names
: ") << Cache.Head().PackageCount << " (" <<
+ cout << _("Total package names: ") << Cache.Head().PackageCount << " (" <<
SizeToStr(Cache.Head().PackageCount*Cache.Head().PackageSz) << ')' << endl;
int Normal = 0;
SizeToStr(Cache.Head().PackageCount*Cache.Head().PackageSz) << ')' << endl;
int Normal = 0;
@@
-292,7
+290,7
@@
bool Stats(CommandLine &Cmd)
cout << _("Total distinct versions: ") << Cache.Head().VersionCount << " (" <<
SizeToStr(Cache.Head().VersionCount*Cache.Head().VersionSz) << ')' << endl;
cout << _("Total distinct versions: ") << Cache.Head().VersionCount << " (" <<
SizeToStr(Cache.Head().VersionCount*Cache.Head().VersionSz) << ')' << endl;
- cout << _("Total
Distinct D
escriptions: ") << Cache.Head().DescriptionCount << " (" <<
+ cout << _("Total
distinct d
escriptions: ") << Cache.Head().DescriptionCount << " (" <<
SizeToStr(Cache.Head().DescriptionCount*Cache.Head().DescriptionSz) << ')' << endl;
cout << _("Total dependencies: ") << Cache.Head().DependsCount << " (" <<
SizeToStr(Cache.Head().DependsCount*Cache.Head().DependencySz) << ')' << endl;
SizeToStr(Cache.Head().DescriptionCount*Cache.Head().DescriptionSz) << ')' << endl;
cout << _("Total dependencies: ") << Cache.Head().DependsCount << " (" <<
SizeToStr(Cache.Head().DependsCount*Cache.Head().DependencySz) << ')' << endl;
@@
-557,6
+555,7
@@
bool Depends(CommandLine &CmdL)
bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
bool Installed = _config->FindB("APT::Cache::Installed",false);
bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
bool Installed = _config->FindB("APT::Cache::Installed",false);
+ bool Important = _config->FindB("APT::Cache::Important",false);
bool DidSomething;
do
{
bool DidSomething;
do
{
@@
-579,7
+578,12
@@
bool Depends(CommandLine &CmdL)
for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
{
for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
{
-
+ // Important deps only
+ if (Important == true)
+ if (D->Type != pkgCache::Dep::PreDepends &&
+ D->Type != pkgCache::Dep::Depends)
+ continue;
+
pkgCache::PkgIterator Trg = D.TargetPkg();
if((Installed && Trg->CurrentVer != 0) || !Installed)
pkgCache::PkgIterator Trg = D.TargetPkg();
if((Installed && Trg->CurrentVer != 0) || !Installed)
@@
-1272,7
+1276,7
@@
bool DisplayRecord(pkgCache::VerIterator V)
/*}}}*/
// Search - Perform a search /*{{{*/
// ---------------------------------------------------------------------
/*}}}*/
// Search - Perform a search /*{{{*/
// ---------------------------------------------------------------------
-/* This searches the package names and pac
ak
ge descriptions for a pattern */
+/* This searches the package names and pac
ka
ge descriptions for a pattern */
struct ExDescFile
{
pkgCache::DescFile *Df;
struct ExDescFile
{
pkgCache::DescFile *Df;
@@
-1529,7
+1533,8
@@
bool Policy(CommandLine &CmdL)
if (SrcList->FindIndex(F,Indx) == false &&
_system->FindIndex(F,Indx) == false)
return _error->Error(_("Cache is out of sync, can't x-ref a package file"));
if (SrcList->FindIndex(F,Indx) == false &&
_system->FindIndex(F,Indx) == false)
return _error->Error(_("Cache is out of sync, can't x-ref a package file"));
- printf(_("%4i %s\n"),
+
+ printf("%4i %s\n",
Plcy.GetPriority(F),Indx->Describe(true).c_str());
// Print the reference information for the package
Plcy.GetPriority(F),Indx->Describe(true).c_str());
// Print the reference information for the package
@@
-1711,8
+1716,8
@@
bool GenCaches(CommandLine &Cmd)
/* */
bool ShowHelp(CommandLine &Cmd)
{
/* */
bool ShowHelp(CommandLine &Cmd)
{
- ioprintf(cout,_("%s %s for %s
%s
compiled on %s %s\n"),PACKAGE,VERSION,
- COMMON_
OS,COMMON_CPU
,__DATE__,__TIME__);
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ COMMON_
ARCH
,__DATE__,__TIME__);
if (_config->FindB("version") == true)
return true;
if (_config->FindB("version") == true)
return true;
@@
-1739,8
+1744,8
@@
bool ShowHelp(CommandLine &Cmd)
" show - Show a readable record for the package\n"
" depends - Show raw dependency information for a package\n"
" rdepends - Show reverse dependency information for a package\n"
" show - Show a readable record for the package\n"
" depends - Show raw dependency information for a package\n"
" rdepends - Show reverse dependency information for a package\n"
- " pkgnames - List the names of all packages\n"
- " dotty - Generate package graphs for GraphVi
s
\n"
+ " pkgnames - List the names of all packages
in the system
\n"
+ " dotty - Generate package graphs for GraphVi
z
\n"
" xvcg - Generate package graphs for xvcg\n"
" policy - Show policy settings\n"
"\n"
" xvcg - Generate package graphs for xvcg\n"
" policy - Show policy settings\n"
"\n"