- pkgCache *Cache = CacheFile.GetPkgCache();
- pkgDepCache *DepCache = CacheFile.GetDepCache();
- if (unlikely(Cache == NULL || DepCache == NULL))
+ pkgDepCache * const DepCache = CacheFile.GetDepCache();
+ if (unlikely(DepCache == nullptr))
- pkgCache *Cache = CacheFile.GetPkgCache();
- pkgDepCache *DepCache = CacheFile.GetDepCache();
- if (unlikely(Cache == NULL || DepCache == NULL))
+ pkgDepCache * const DepCache = CacheFile.GetDepCache();
+ if (unlikely(DepCache == nullptr))
- pkgCache *Cache = CacheFile.GetPkgCache();
- pkgDepCache *DepCache = CacheFile.GetDepCache();
- if (unlikely(Cache == NULL || DepCache == NULL))
+ pkgDepCache * const DepCache = CacheFile.GetDepCache();
+ if (unlikely(DepCache == nullptr))
- packages.reserve(Cache->HeaderP->PackageCount / 3);
- for (pkgCache::PkgIterator P = Cache->PkgBegin(); P.end() == false; ++P)
+ packages.reserve(DepCache->Head().PackageCount / 3);
+ for (pkgCache::PkgIterator P = DepCache->PkgBegin(); P.end() == false; ++P)
if (P->CurrentVer != 0 &&
(((*DepCache)[P].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto) == ShowAuto)
packages.push_back(P.FullName(true));
if (P->CurrentVer != 0 &&
(((*DepCache)[P].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto) == ShowAuto)
packages.push_back(P.FullName(true));
return false;
APT::VersionVector pkgset = APT::VersionVector::FromCommandLine(CacheFile, CmdL.FileList + 1, APT::CacheSetHelper::INSTCAND);
return false;
APT::VersionVector pkgset = APT::VersionVector::FromCommandLine(CacheFile, CmdL.FileList + 1, APT::CacheSetHelper::INSTCAND);
{
return {
{"auto",&DoAuto, _("Mark the given packages as automatically installed")},
{
return {
{"auto",&DoAuto, _("Mark the given packages as automatically installed")},
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_MARK, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
CommandLine CmdL;
auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_MARK, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);