#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/init.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/init.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/version.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/version.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/sptr.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/sptr.h>
- CacheSetHelperVirtuals(bool const &ShowErrors = true, GlobalError::MsgType const &ErrorType = GlobalError::NOTICE) : CacheSetHelper(ShowErrors, ErrorType) {}
+ CacheSetHelperVirtuals(bool const ShowErrors = true, GlobalError::MsgType const &ErrorType = GlobalError::NOTICE) : CacheSetHelper(ShowErrors, ErrorType) {}
// UnMet - Show unmet dependencies /*{{{*/
// ---------------------------------------------------------------------
/* */
// UnMet - Show unmet dependencies /*{{{*/
// ---------------------------------------------------------------------
/* */
for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V)
if (ShowUnMet(V, Important) == false)
return false;
for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V)
if (ShowUnMet(V, Important) == false)
return false;
- APT::VersionSet verset = APT::VersionSet::FromCommandLine(CacheFile, CmdL.FileList + 1,
- APT::VersionSet::CANDIDATE, helper);
- for (APT::VersionSet::iterator V = verset.begin(); V != verset.end(); ++V)
+ APT::VersionList verset = APT::VersionList::FromCommandLine(CacheFile, CmdL.FileList + 1,
+ APT::VersionList::CANDIDATE, helper);
+ for (APT::VersionList::iterator V = verset.begin(); V != verset.end(); ++V)
{
cout << " Description Language: " << D.LanguageCode() << endl
<< " File: " << D.FileList().File().FileName() << endl
{
cout << " Description Language: " << D.LanguageCode() << endl
<< " File: " << D.FileList().File().FileName() << endl
cout << Dep.TargetPkg().FullName(true) << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") ";
cout << endl;
}
cout << "Provides: " << endl;
cout << Dep.TargetPkg().FullName(true) << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") ";
cout << endl;
}
cout << "Provides: " << endl;
cout << _("Total globbed strings: ") << Count << " (" << SizeToStr(Size) << ')' << endl;
unsigned long DepVerSize = 0;
cout << _("Total globbed strings: ") << Count << " (" << SizeToStr(Size) << ')' << endl;
unsigned long DepVerSize = 0;
{
cout << " Version: " << V.VerStr() << endl;
cout << " File: " << V.FileList().File().FileName() << endl;
{
cout << " Version: " << V.VerStr() << endl;
cout << " File: " << V.FileList().File().FileName() << endl;
{
cout << " Description Language: " << D.LanguageCode() << endl
<< " File: " << D.FileList().File().FileName() << endl
{
cout << " Description Language: " << D.LanguageCode() << endl
<< " File: " << D.FileList().File().FileName() << endl
memset(VFList,0,sizeof(*VFList)*Count);
// Map versions that we want to write out onto the VerList array.
memset(VFList,0,sizeof(*VFList)*Count);
// Map versions that we want to write out onto the VerList array.
- APT::VersionSet verset = APT::VersionSet::FromCommandLine(CacheFile, CmdL.FileList + 1, APT::VersionSet::CANDIDATE, helper);
+ APT::VersionList verset = APT::VersionList::FromCommandLine(CacheFile, CmdL.FileList + 1, APT::VersionList::CANDIDATE, helper);
if (verset.empty() == true && helper.virtualPkgs.empty() == true)
return _error->Error(_("No packages found"));
std::vector<bool> Shown(Cache->Head().PackageCount);
if (verset.empty() == true && helper.virtualPkgs.empty() == true)
return _error->Error(_("No packages found"));
std::vector<bool> Shown(Cache->Head().PackageCount);
if (RevDepends == true)
cout << "Reverse Depends:" << endl;
for (pkgCache::DepIterator D = RevDepends ? Pkg.RevDependsList() : Ver.DependsList();
if (RevDepends == true)
cout << "Reverse Depends:" << endl;
for (pkgCache::DepIterator D = RevDepends ? Pkg.RevDependsList() : Ver.DependsList();
{
// See if anything can meet this dep
// Walk along the actual package providing versions
bool Hit = false;
pkgCache::PkgIterator DPkg = D.TargetPkg();
for (pkgCache::VerIterator I = DPkg.VersionList();
{
// See if anything can meet this dep
// Walk along the actual package providing versions
bool Hit = false;
pkgCache::PkgIterator DPkg = D.TargetPkg();
for (pkgCache::VerIterator I = DPkg.VersionList();
{
/* If a conflicts does not meet anything in the database
then show the relation but do not recurse */
{
/* If a conflicts does not meet anything in the database
then show the relation but do not recurse */
/* Draw the box colours after the fact since we can not tell what colour
they should be until everything is finished drawing */
/* Draw the box colours after the fact since we can not tell what colour
they should be until everything is finished drawing */
{
// See if anything can meet this dep
// Walk along the actual package providing versions
bool Hit = false;
pkgCache::PkgIterator DPkg = D.TargetPkg();
for (pkgCache::VerIterator I = DPkg.VersionList();
{
// See if anything can meet this dep
// Walk along the actual package providing versions
bool Hit = false;
pkgCache::PkgIterator DPkg = D.TargetPkg();
for (pkgCache::VerIterator I = DPkg.VersionList();
{
/* If a conflicts does not meet anything in the database
then show the relation but do not recurse */
{
/* If a conflicts does not meet anything in the database
then show the relation but do not recurse */
/* Draw the box colours after the fact since we can not tell what colour
they should be until everything is finished drawing */
/* Draw the box colours after the fact since we can not tell what colour
they should be until everything is finished drawing */
if ((*DepCache)[P].Flags & pkgCache::Flag::Auto)
packages.push_back(P.Name());
std::sort(packages.begin(), packages.end());
if ((*DepCache)[P].Flags & pkgCache::Flag::Auto)
packages.push_back(P.Name());
std::sort(packages.begin(), packages.end());
- APT::VersionSet::Version const select = _config->FindB("APT::Cache::AllVersions", true) ?
- APT::VersionSet::ALL : APT::VersionSet::CANDIDATE;
- APT::VersionSet const verset = APT::VersionSet::FromCommandLine(CacheFile, CmdL.FileList + 1, select, helper);
- for (APT::VersionSet::const_iterator Ver = verset.begin(); Ver != verset.end(); ++Ver)
+ APT::VersionList::Version const select = _config->FindB("APT::Cache::AllVersions", true) ?
+ APT::VersionList::ALL : APT::VersionList::CANDIDATE;
+ APT::VersionList const verset = APT::VersionList::FromCommandLine(CacheFile, CmdL.FileList + 1, select, helper);
+ for (APT::VersionList::const_iterator Ver = verset.begin(); Ver != verset.end(); ++Ver)
// Show any packages have explicit pins
cout << _("Pinned packages:") << endl;
pkgCache::PkgIterator I = Cache->PkgBegin();
// Show any packages have explicit pins
cout << _("Pinned packages:") << endl;
pkgCache::PkgIterator I = Cache->PkgBegin();
// Print out detailed information for each package
APT::CacheSetHelper helper(true, GlobalError::NOTICE);
// Print out detailed information for each package
APT::CacheSetHelper helper(true, GlobalError::NOTICE);
- APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1, helper);
- for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ APT::PackageList pkgset = APT::PackageList::FromCommandLine(CacheFile, CmdL.FileList + 1, helper);
+ for (APT::PackageList::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
if (Pkg.CurrentVer() == V)
cout << " *** " << V.VerStr();
else
cout << " " << V.VerStr();
cout << " " << Plcy->GetPriority(Pkg) << endl;
{
if (Pkg.CurrentVer() == V)
cout << " *** " << V.VerStr();
else
cout << " " << V.VerStr();
cout << " " << Plcy->GetPriority(Pkg) << endl;
- APT::PackageSet pkgset = APT::PackageSet::FromString(CacheFile, *I, helper);
- for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ APT::PackageList pkgset = APT::PackageList::FromString(CacheFile, *I, helper);
+ for (APT::PackageList::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
// This might be nice, but wouldn't uniquely identify the source -mdz
// if (VF.File().Archive() != 0)
{
// This might be nice, but wouldn't uniquely identify the source -mdz
// if (VF.File().Archive() != 0)
{
vector<pkgIndexFile *> *Indexes = (*S)->GetIndexFiles();
for (vector<pkgIndexFile *>::const_iterator IF = Indexes->begin();
{
vector<pkgIndexFile *> *Indexes = (*S)->GetIndexFiles();
for (vector<pkgIndexFile *>::const_iterator IF = Indexes->begin();
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)
" unmet - Show unmet dependencies\n"
" search - Search the package list for a regex pattern\n"
" show - Show a readable record for the package\n"
" unmet - Show unmet dependencies\n"
" search - Search the package list for a regex pattern\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 in the system\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 in the system\n"
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
{0,"installed","APT::Cache::Installed",0},
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
{0,"installed","APT::Cache::Installed",0},
- {0,"pre-depends","APT::Cache::ShowPreDepends",0},
+ {0,"pre-depends","APT::Cache::ShowPre-Depends",0},
{0,"depends","APT::Cache::ShowDepends",0},
{0,"recommends","APT::Cache::ShowRecommends",0},
{0,"suggests","APT::Cache::ShowSuggests",0},
{0,"depends","APT::Cache::ShowDepends",0},
{0,"recommends","APT::Cache::ShowRecommends",0},
{0,"suggests","APT::Cache::ShowSuggests",0},