Creating and passing around a bunch of pointers of IndexTargets (and of
a vector of pointers of IndexTargets) is probably done to avoid the
'costly' copy of container, but we are really not in a timecritical
operation here and move semantics will help us even further in the
future. On the other hand we never do a proper cleanup of these
pointers, which is very dirty, even if structures aren't that big…
The changes will effecting many items only effect our own hidden class,
so we can do that without fearing breaking interfaces or anything.
Git-Dch: Ignore
if (State == StateFetchDiff)
return patch.download_hashes;
else if (State == StateApplyDiff)
if (State == StateFetchDiff)
return patch.download_hashes;
else if (State == StateApplyDiff)
- return GetExpectedHashesFor(Target->MetaKey);
+ return GetExpectedHashesFor(Target.MetaKey);
return HashStringList();
}
return HashStringList();
}
}
std::string pkgAcqIndex::GetFinalFilename() const
{
}
std::string pkgAcqIndex::GetFinalFilename() const
{
- std::string const FinalFile = GetFinalFileNameFromURI(Target->URI);
- return GetCompressedFileName(Target->URI, FinalFile, CurrentCompressionExtension);
+ std::string const FinalFile = GetFinalFileNameFromURI(Target.URI);
+ return GetCompressedFileName(Target.URI, FinalFile, CurrentCompressionExtension);
}
std::string pkgAcqMetaSig::GetFinalFilename() const
{
}
std::string pkgAcqMetaSig::GetFinalFilename() const
{
- return GetFinalFileNameFromURI(Target->URI);
+ return GetFinalFileNameFromURI(Target.URI);
}
std::string pkgAcqBaseIndex::GetFinalFilename() const
{
}
std::string pkgAcqBaseIndex::GetFinalFilename() const
{
- return GetFinalFileNameFromURI(Target->URI);
+ return GetFinalFileNameFromURI(Target.URI);
}
std::string pkgAcqMetaBase::GetFinalFilename() const
{
}
std::string pkgAcqMetaBase::GetFinalFilename() const
{
- return GetFinalFileNameFromURI(DataTarget.URI);
+ return GetFinalFileNameFromURI(Target.URI);
}
std::string pkgAcqArchive::GetFinalFilename() const
{
}
std::string pkgAcqArchive::GetFinalFilename() const
{
// pkgAcqTransactionItem::GetMetaKey and specialisations for child classes /*{{{*/
std::string pkgAcqTransactionItem::GetMetaKey() const
{
// pkgAcqTransactionItem::GetMetaKey and specialisations for child classes /*{{{*/
std::string pkgAcqTransactionItem::GetMetaKey() const
{
- return Target->MetaKey;
}
std::string pkgAcqIndex::GetMetaKey() const
{
if (Stage == STAGE_DECOMPRESS_AND_VERIFY || CurrentCompressionExtension == "uncompressed")
}
std::string pkgAcqIndex::GetMetaKey() const
{
if (Stage == STAGE_DECOMPRESS_AND_VERIFY || CurrentCompressionExtension == "uncompressed")
- return Target->MetaKey;
- return Target->MetaKey + "." + CurrentCompressionExtension;
+ return Target.MetaKey;
+ return Target.MetaKey + "." + CurrentCompressionExtension;
}
std::string pkgAcqDiffIndex::GetMetaKey() const
{
}
std::string pkgAcqDiffIndex::GetMetaKey() const
{
- return Target->MetaKey + ".diff/Index";
+ return Target.MetaKey + ".diff/Index";
}
/*}}}*/
//pkgAcqTransactionItem::TransactionState and specialisations for child classes /*{{{*/
}
/*}}}*/
//pkgAcqTransactionItem::TransactionState and specialisations for child classes /*{{{*/
case TransactionCommit:
break;
case TransactionAbort:
case TransactionCommit:
break;
case TransactionAbort:
- std::string const Partial = GetPartialFileNameFromURI(Target->URI);
+ std::string const Partial = GetPartialFileNameFromURI(Target.URI);
unlink(Partial.c_str());
break;
}
unlink(Partial.c_str());
break;
}
reach its done state to prevent cleanup deleting the mentioned file.
Handy in cases in which we know we have the file already, like IMS-Hits. */
{
reach its done state to prevent cleanup deleting the mentioned file.
Handy in cases in which we know we have the file already, like IMS-Hits. */
{
- IndexTarget const * const Target;
+ IndexTarget const Target;
- virtual std::string DescURI() const {return Target->URI;};
+ virtual std::string DescURI() const {return Target.URI;};
virtual HashStringList GetExpectedHashes() const {return HashStringList();};
virtual HashStringList GetExpectedHashes() const {return HashStringList();};
- NoActionItem(pkgAcquire * const Owner, IndexTarget const * const Target) :
+ NoActionItem(pkgAcquire * const Owner, IndexTarget const Target) :
pkgAcquire::Item(Owner), Target(Target)
{
Status = StatDone;
pkgAcquire::Item(Owner), Target(Target)
{
Status = StatDone;
- DestFile = GetFinalFileNameFromURI(Target->URI);
+ DestFile = GetFinalFileNameFromURI(Target.URI);
/*}}}*/
pkgAcqTransactionItem::pkgAcqTransactionItem(pkgAcquire * const Owner, /*{{{*/
/*}}}*/
pkgAcqTransactionItem::pkgAcqTransactionItem(pkgAcquire * const Owner, /*{{{*/
- pkgAcqMetaBase * const TransactionManager, IndexTarget const * const Target) :
+ pkgAcqMetaBase * const TransactionManager, IndexTarget const Target) :
pkgAcquire::Item(Owner), Target(Target), TransactionManager(TransactionManager)
{
if (TransactionManager != this)
pkgAcquire::Item(Owner), Target(Target), TransactionManager(TransactionManager)
{
if (TransactionManager != this)
// AcqMetaBase - Constructor /*{{{*/
pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqMetaBase - Constructor /*{{{*/
pkgAcqMetaBase::pkgAcqMetaBase(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- std::vector<IndexTarget*> const * const IndexTargets,
+ std::vector<IndexTarget> const IndexTargets,
IndexTarget const &DataTarget,
indexRecords * const MetaIndexParser)
IndexTarget const &DataTarget,
indexRecords * const MetaIndexParser)
-: pkgAcqTransactionItem(Owner, TransactionManager, NULL), DataTarget(DataTarget),
+: pkgAcqTransactionItem(Owner, TransactionManager, DataTarget),
MetaIndexParser(MetaIndexParser), LastMetaIndexParser(NULL), IndexTargets(IndexTargets),
AuthPass(false), IMSHit(false)
{
MetaIndexParser(MetaIndexParser), LastMetaIndexParser(NULL), IndexTargets(IndexTargets),
AuthPass(false), IMSHit(false)
{
// at this point the real Items are loaded in the fetcher
ExpectedAdditionalItems = 0;
// at this point the real Items are loaded in the fetcher
ExpectedAdditionalItems = 0;
- vector <IndexTarget*>::const_iterator Target;
- for (Target = IndexTargets->begin();
- Target != IndexTargets->end();
+ for (std::vector <IndexTarget>::const_iterator Target = IndexTargets.begin();
+ Target != IndexTargets.end();
++Target)
{
bool trypdiff = _config->FindB("Acquire::PDiffs", true);
if (verify == true)
{
++Target)
{
bool trypdiff = _config->FindB("Acquire::PDiffs", true);
if (verify == true)
{
- if (TransactionManager->MetaIndexParser->Exists((*Target)->MetaKey) == false)
+ if (TransactionManager->MetaIndexParser->Exists(Target->MetaKey) == false)
{
// optional targets that we do not have in the Release file are skipped
{
// optional targets that we do not have in the Release file are skipped
- if ((*Target)->IsOptional)
+ if (Target->IsOptional)
continue;
Status = StatAuthError;
continue;
Status = StatAuthError;
- strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), (*Target)->MetaKey.c_str());
+ strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), Target->MetaKey.c_str());
- if (RealFileExists(GetFinalFileNameFromURI((*Target)->URI)))
+ if (RealFileExists(GetFinalFileNameFromURI(Target->URI)))
{
if (TransactionManager->LastMetaIndexParser != NULL)
{
{
if (TransactionManager->LastMetaIndexParser != NULL)
{
- HashStringList const newFile = GetExpectedHashesFromFor(TransactionManager->MetaIndexParser, (*Target)->MetaKey);
- HashStringList const oldFile = GetExpectedHashesFromFor(TransactionManager->LastMetaIndexParser, (*Target)->MetaKey);
+ HashStringList const newFile = GetExpectedHashesFromFor(TransactionManager->MetaIndexParser, Target->MetaKey);
+ HashStringList const oldFile = GetExpectedHashesFromFor(TransactionManager->LastMetaIndexParser, Target->MetaKey);
if (newFile == oldFile)
{
// we have the file already, no point in trying to acquire it again
if (newFile == oldFile)
{
// we have the file already, no point in trying to acquire it again
trypdiff = false; // no file to patch
// check if we have patches available
trypdiff = false; // no file to patch
// check if we have patches available
- trypdiff &= TransactionManager->MetaIndexParser->Exists((*Target)->MetaKey + ".diff/Index");
+ trypdiff &= TransactionManager->MetaIndexParser->Exists(Target->MetaKey + ".diff/Index");
}
// if we have no file to patch, no point in trying
}
// if we have no file to patch, no point in trying
- trypdiff &= RealFileExists(GetFinalFileNameFromURI((*Target)->URI));
+ trypdiff &= RealFileExists(GetFinalFileNameFromURI(Target->URI));
// no point in patching from local sources
if (trypdiff)
{
// no point in patching from local sources
if (trypdiff)
{
- std::string const proto = (*Target)->URI.substr(0, strlen("file:/"));
+ std::string const proto = Target->URI.substr(0, strlen("file:/"));
if (proto == "file:/" || proto == "copy:/" || proto == "cdrom:")
trypdiff = false;
}
if (proto == "file:/" || proto == "copy:/" || proto == "cdrom:")
trypdiff = false;
}
// the download progress display (e.g. 7d 3h 42min 1s)
_("Release file for %s is expired (invalid since %s). "
"Updates for this repository will not be applied."),
// the download progress display (e.g. 7d 3h 42min 1s)
_("Release file for %s is expired (invalid since %s). "
"Updates for this repository will not be applied."),
- DataTarget.URI.c_str(), TimeToStr(invalid_since).c_str());
+ Target.URI.c_str(), TimeToStr(invalid_since).c_str());
if (ErrorText.empty())
ErrorText = errmsg;
return _error->Error("%s", errmsg.c_str());
if (ErrorText.empty())
ErrorText = errmsg;
return _error->Error("%s", errmsg.c_str());
pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire * const Owner, /*{{{*/
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget, IndexTarget const &DetachedSigTarget,
pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire * const Owner, /*{{{*/
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget, IndexTarget const &DetachedSigTarget,
- const vector<IndexTarget*>* const IndexTargets,
+ std::vector<IndexTarget> const IndexTargets,
indexRecords * const MetaIndexParser) :
pkgAcqMetaIndex(Owner, this, ClearsignedTarget, DetachedSigTarget, IndexTargets, MetaIndexParser),
ClearsignedTarget(ClearsignedTarget),
DetachedDataTarget(DetachedDataTarget), DetachedSigTarget(DetachedSigTarget)
{
// index targets + (worst case:) Release/Release.gpg
indexRecords * const MetaIndexParser) :
pkgAcqMetaIndex(Owner, this, ClearsignedTarget, DetachedSigTarget, IndexTargets, MetaIndexParser),
ClearsignedTarget(ClearsignedTarget),
DetachedDataTarget(DetachedDataTarget), DetachedSigTarget(DetachedSigTarget)
{
// index targets + (worst case:) Release/Release.gpg
- ExpectedAdditionalItems = IndexTargets->size() + 2;
+ ExpectedAdditionalItems = IndexTargets.size() + 2;
TransactionManager->Add(this);
}
/*}}}*/
TransactionManager->Add(this);
}
/*}}}*/
// We got an InRelease file IMSHit, but we haven't one, which means
// we had a valid Release/Release.gpg combo stepping in, which we have
// to 'acquire' now to ensure list cleanup isn't removing them
// We got an InRelease file IMSHit, but we haven't one, which means
// we had a valid Release/Release.gpg combo stepping in, which we have
// to 'acquire' now to ensure list cleanup isn't removing them
- new NoActionItem(Owner, &DetachedDataTarget);
- new NoActionItem(Owner, &DetachedSigTarget);
+ new NoActionItem(Owner, DetachedDataTarget);
+ new NoActionItem(Owner, DetachedSigTarget);
pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget,
IndexTarget const &DetachedSigTarget,
pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget,
IndexTarget const &DetachedSigTarget,
- vector<IndexTarget*> const * const IndexTargets,
+ vector<IndexTarget> const IndexTargets,
indexRecords * const MetaIndexParser) :
pkgAcqMetaBase(Owner, TransactionManager, IndexTargets, DataTarget, MetaIndexParser),
DetachedSigTarget(DetachedSigTarget)
indexRecords * const MetaIndexParser) :
pkgAcqMetaBase(Owner, TransactionManager, IndexTargets, DataTarget, MetaIndexParser),
DetachedSigTarget(DetachedSigTarget)
Desc.URI = DataTarget.URI;
// we expect more item
Desc.URI = DataTarget.URI;
// we expect more item
- ExpectedAdditionalItems = IndexTargets->size();
+ ExpectedAdditionalItems = IndexTargets.size();
QueueURI(Desc);
}
/*}}}*/
QueueURI(Desc);
}
/*}}}*/
// we have a Release file, now download the Signature, all further
// verify/queue for additional downloads will be done in the
// pkgAcqMetaSig::Done() code
// we have a Release file, now download the Signature, all further
// verify/queue for additional downloads will be done in the
// pkgAcqMetaSig::Done() code
- new pkgAcqMetaSig(Owner, TransactionManager, &DetachedSigTarget, this);
+ new pkgAcqMetaSig(Owner, TransactionManager, DetachedSigTarget, this);
_error->Warning(_("The repository '%s' does not have a Release file. "
"This is deprecated, please contact the owner of the "
_error->Warning(_("The repository '%s' does not have a Release file. "
"This is deprecated, please contact the owner of the "
- "repository."), DataTarget.Description.c_str());
+ "repository."), Target.Description.c_str());
// No Release file was present so fall
// back to queueing Packages files without verification
// No Release file was present so fall
// back to queueing Packages files without verification
/*}}}*/
std::string pkgAcqMetaIndex::DescURI() const /*{{{*/
{
/*}}}*/
std::string pkgAcqMetaIndex::DescURI() const /*{{{*/
{
}
/*}}}*/
// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
}
/*}}}*/
// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target,
+ IndexTarget const Target,
pkgAcqMetaIndex * const MetaIndex) :
pkgAcqTransactionItem(Owner, TransactionManager, Target), MetaIndex(MetaIndex)
{
pkgAcqMetaIndex * const MetaIndex) :
pkgAcqTransactionItem(Owner, TransactionManager, Target), MetaIndex(MetaIndex)
{
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
// remove any partial downloaded sig-file in partial/.
// it may confuse proxies and is too small to warrant a
// remove any partial downloaded sig-file in partial/.
// it may confuse proxies and is too small to warrant a
<< TransactionManager << std::endl;
// Create the item
<< TransactionManager << std::endl;
// Create the item
- Desc.Description = Target->Description;
+ Desc.Description = Target.Description;
- Desc.ShortDesc = Target->ShortDesc;
- Desc.URI = Target->URI;
+ Desc.ShortDesc = Target.ShortDesc;
+ Desc.URI = Target.URI;
// If we got a hit for Release, we will get one for Release.gpg too (or obscure errors),
// so we skip the download step and go instantly to verification
// If we got a hit for Release, we will get one for Release.gpg too (or obscure errors),
// so we skip the download step and go instantly to verification
{
std::string downgrade_msg;
strprintf(downgrade_msg, _("The repository '%s' is no longer signed."),
{
std::string downgrade_msg;
strprintf(downgrade_msg, _("The repository '%s' is no longer signed."),
- MetaIndex->DataTarget.Description.c_str());
+ MetaIndex->Target.Description.c_str());
if(_config->FindB("Acquire::AllowDowngradeToInsecureRepositories"))
{
// meh, the users wants to take risks (we still mark the packages
if(_config->FindB("Acquire::AllowDowngradeToInsecureRepositories"))
{
// meh, the users wants to take risks (we still mark the packages
else
_error->Warning(_("The data from '%s' is not signed. Packages "
"from that repository can not be authenticated."),
else
_error->Warning(_("The data from '%s' is not signed. Packages "
"from that repository can not be authenticated."),
- MetaIndex->DataTarget.Description.c_str());
+ MetaIndex->Target.Description.c_str());
// ensures that a Release.gpg file in the lists/ is removed by the transaction
TransactionManager->TransactionStageRemoval(this, DestFile);
// ensures that a Release.gpg file in the lists/ is removed by the transaction
TransactionManager->TransactionStageRemoval(this, DestFile);
// AcqBaseIndex - Constructor /*{{{*/
pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqBaseIndex - Constructor /*{{{*/
pkgAcqBaseIndex::pkgAcqBaseIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target)
+ IndexTarget const Target)
: pkgAcqTransactionItem(Owner, TransactionManager, Target)
{
}
: pkgAcqTransactionItem(Owner, TransactionManager, Target)
{
}
*/
pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
*/
pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target)
+ IndexTarget const Target)
: pkgAcqBaseIndex(Owner, TransactionManager, Target)
{
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
Desc.Owner = this;
: pkgAcqBaseIndex(Owner, TransactionManager, Target)
{
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
Desc.Owner = this;
- Desc.Description = Target->Description + ".diff/Index";
- Desc.ShortDesc = Target->ShortDesc;
- Desc.URI = Target->URI + ".diff/Index";
+ Desc.Description = Target.Description + ".diff/Index";
+ Desc.ShortDesc = Target.ShortDesc;
+ Desc.URI = Target.URI + ".diff/Index";
DestFile = GetPartialFileNameFromURI(Desc.URI);
DestFile = GetPartialFileNameFromURI(Desc.URI);
- std::string const CurrentPackagesFile = GetFinalFileNameFromURI(Target->URI);
- HashStringList const TargetFileHashes = GetExpectedHashesFor(Target->MetaKey);
+ std::string const CurrentPackagesFile = GetFinalFileNameFromURI(Target.URI);
+ HashStringList const TargetFileHashes = GetExpectedHashesFor(Target.MetaKey);
if (TargetFileHashes.usable() == false || ServerHashes != TargetFileHashes)
{
if (Debug == true)
if (TargetFileHashes.usable() == false || ServerHashes != TargetFileHashes)
{
if (Debug == true)
HashStringList LocalHashes;
// try avoiding calculating the hash here as this is costly
if (TransactionManager->LastMetaIndexParser != NULL)
HashStringList LocalHashes;
// try avoiding calculating the hash here as this is costly
if (TransactionManager->LastMetaIndexParser != NULL)
- LocalHashes = GetExpectedHashesFromFor(TransactionManager->LastMetaIndexParser, Target->MetaKey);
+ LocalHashes = GetExpectedHashesFromFor(TransactionManager->LastMetaIndexParser, Target.MetaKey);
if (LocalHashes.usable() == false)
{
FileFd fd(CurrentPackagesFile, FileFd::ReadOnly);
if (LocalHashes.usable() == false)
{
FileFd fd(CurrentPackagesFile, FileFd::ReadOnly);
*/
pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
*/
pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target,
+ IndexTarget const Target,
vector<DiffInfo> const &diffs)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
available_patches(diffs)
{
vector<DiffInfo> const &diffs)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
available_patches(diffs)
{
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
Desc.Owner = this;
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
Desc.Owner = this;
- Description = Target->Description;
- Desc.ShortDesc = Target->ShortDesc;
+ Description = Target.Description;
+ Desc.ShortDesc = Target.ShortDesc;
if(available_patches.empty() == true)
{
// we are done (yeah!), check hashes against the final file
if(available_patches.empty() == true)
{
// we are done (yeah!), check hashes against the final file
- DestFile = GetFinalFileNameFromURI(Target->URI);
+ DestFile = GetFinalFileNameFromURI(Target.URI);
Finish(true);
}
else
{
// patching needs to be bootstrapped with the 'old' version
Finish(true);
}
else
{
// patching needs to be bootstrapped with the 'old' version
- std::string const PartialFile = GetPartialFileNameFromURI(Target->URI);
+ std::string const PartialFile = GetPartialFileNameFromURI(Target.URI);
if (RealFileExists(PartialFile) == false)
{
if (symlink(GetFinalFilename().c_str(), PartialFile.c_str()) != 0)
if (RealFileExists(PartialFile) == false)
{
if (symlink(GetFinalFilename().c_str(), PartialFile.c_str()) != 0)
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
RenameOnError(PDiffError);
std::string const patchname = GetDiffsPatchFileName(DestFile);
if (RealFileExists(patchname))
RenameOnError(PDiffError);
std::string const patchname = GetDiffsPatchFileName(DestFile);
if (RealFileExists(patchname))
bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
{
// calc sha1 of the just patched file
bool pkgAcqIndexDiffs::QueueNextDiff() /*{{{*/
{
// calc sha1 of the just patched file
- std::string const FinalFile = GetPartialFileNameFromURI(Target->URI);
+ std::string const FinalFile = GetPartialFileNameFromURI(Target.URI);
if(!FileExists(FinalFile))
{
if(!FileExists(FinalFile))
{
if(Debug)
std::clog << "QueueNextDiff: " << FinalFile << " (" << LocalHashes.find(NULL)->toStr() << ")" << std::endl;
if(Debug)
std::clog << "QueueNextDiff: " << FinalFile << " (" << LocalHashes.find(NULL)->toStr() << ")" << std::endl;
- HashStringList const TargetFileHashes = GetExpectedHashesFor(Target->MetaKey);
+ HashStringList const TargetFileHashes = GetExpectedHashesFor(Target.MetaKey);
if (unlikely(LocalHashes.usable() == false || TargetFileHashes.usable() == false))
{
Failed("Local/Expected hashes are not usable", NULL);
if (unlikely(LocalHashes.usable() == false || TargetFileHashes.usable() == false))
{
Failed("Local/Expected hashes are not usable", NULL);
}
// queue the right diff
}
// queue the right diff
- Desc.URI = Target->URI + ".diff/" + available_patches[0].file + ".gz";
+ Desc.URI = Target.URI + ".diff/" + available_patches[0].file + ".gz";
Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
- DestFile = GetPartialFileNameFromURI(Target->URI + ".diff/" + available_patches[0].file);
+ DestFile = GetPartialFileNameFromURI(Target.URI + ".diff/" + available_patches[0].file);
if(Debug)
std::clog << "pkgAcqIndexDiffs::QueueNextDiff(): " << Desc.URI << std::endl;
if(Debug)
std::clog << "pkgAcqIndexDiffs::QueueNextDiff(): " << Desc.URI << std::endl;
Item::Done(Message, Hashes, Cnf);
Item::Done(Message, Hashes, Cnf);
- std::string const FinalFile = GetPartialFileNameFromURI(Target->URI);
+ std::string const FinalFile = GetPartialFileNameFromURI(Target.URI);
std::string const PatchFile = GetDiffsPatchFileName(FinalFile);
// success in downloading a diff, enter ApplyDiff state
std::string const PatchFile = GetDiffsPatchFileName(FinalFile);
// success in downloading a diff, enter ApplyDiff state
// AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/
pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/
pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target,
+ IndexTarget const Target,
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
: pkgAcqBaseIndex(Owner, TransactionManager, Target),
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
Desc.Owner = this;
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
Desc.Owner = this;
- Description = Target->Description;
- Desc.ShortDesc = Target->ShortDesc;
+ Description = Target.Description;
+ Desc.ShortDesc = Target.ShortDesc;
- Desc.URI = Target->URI + ".diff/" + patch.file + ".gz";
+ Desc.URI = Target.URI + ".diff/" + patch.file + ".gz";
Desc.Description = Description + " " + patch.file + string(".pdiff");
Desc.Description = Description + " " + patch.file + string(".pdiff");
- DestFile = GetPartialFileNameFromURI(Target->URI + ".diff/" + patch.file);
+ DestFile = GetPartialFileNameFromURI(Target.URI + ".diff/" + patch.file);
if(Debug)
std::clog << "pkgAcqIndexMergeDiffs: " << Desc.URI << std::endl;
if(Debug)
std::clog << "pkgAcqIndexMergeDiffs: " << Desc.URI << std::endl;
State = StateErrorDiff;
if (Debug)
std::clog << "Falling back to normal index file acquire" << std::endl;
State = StateErrorDiff;
if (Debug)
std::clog << "Falling back to normal index file acquire" << std::endl;
- DestFile = GetPartialFileNameFromURI(Target->URI);
+ DestFile = GetPartialFileNameFromURI(Target.URI);
RenameOnError(PDiffError);
std::string const patchname = GetMergeDiffsPatchFileName(DestFile, patch.file);
if (RealFileExists(patchname))
RenameOnError(PDiffError);
std::string const patchname = GetMergeDiffsPatchFileName(DestFile, patch.file);
if (RealFileExists(patchname))
Item::Done(Message, Hashes, Cnf);
Item::Done(Message, Hashes, Cnf);
- string const FinalFile = GetPartialFileNameFromURI(Target->URI);
+ string const FinalFile = GetPartialFileNameFromURI(Target.URI);
if (State == StateFetchDiff)
{
Rename(DestFile, GetMergeDiffsPatchFileName(FinalFile, patch.file));
if (State == StateFetchDiff)
{
Rename(DestFile, GetMergeDiffsPatchFileName(FinalFile, patch.file));
for (std::vector<pkgAcqIndexMergeDiffs *>::const_iterator I = allPatches->begin();
I != allPatches->end(); ++I)
{
for (std::vector<pkgAcqIndexMergeDiffs *>::const_iterator I = allPatches->begin();
I != allPatches->end(); ++I)
{
- std::string const PartialFile = GetPartialFileNameFromURI(Target->URI);
+ std::string const PartialFile = GetPartialFileNameFromURI(Target.URI);
std::string const patch = GetMergeDiffsPatchFileName(PartialFile, (*I)->patch.file);
unlink(patch.c_str());
}
std::string const patch = GetMergeDiffsPatchFileName(PartialFile, (*I)->patch.file);
unlink(patch.c_str());
}
// AcqIndex::AcqIndex - Constructor /*{{{*/
pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
// AcqIndex::AcqIndex - Constructor /*{{{*/
pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner,
pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target)
+ IndexTarget const Target)
: pkgAcqBaseIndex(Owner, TransactionManager, Target)
{
// autoselect the compression method
AutoSelectCompression();
: pkgAcqBaseIndex(Owner, TransactionManager, Target)
{
// autoselect the compression method
AutoSelectCompression();
- Init(Target->URI, Target->Description, Target->ShortDesc);
+ Init(Target.URI, Target.Description, Target.ShortDesc);
if(_config->FindB("Debug::Acquire::Transaction", false) == true)
std::clog << "New pkgIndex with TransactionManager "
if(_config->FindB("Debug::Acquire::Transaction", false) == true)
std::clog << "New pkgIndex with TransactionManager "
{
std::vector<std::string> types = APT::Configuration::getCompressionTypes();
CompressionExtensions = "";
{
std::vector<std::string> types = APT::Configuration::getCompressionTypes();
CompressionExtensions = "";
- if (TransactionManager->MetaIndexParser != NULL && TransactionManager->MetaIndexParser->Exists(Target->MetaKey))
+ if (TransactionManager->MetaIndexParser != NULL && TransactionManager->MetaIndexParser->Exists(Target.MetaKey))
{
for (std::vector<std::string>::const_iterator t = types.begin();
t != types.end(); ++t)
{
{
for (std::vector<std::string>::const_iterator t = types.begin();
t != types.end(); ++t)
{
- std::string CompressedMetaKey = string(Target->MetaKey).append(".").append(*t);
+ std::string CompressedMetaKey = string(Target.MetaKey).append(".").append(*t);
if (*t == "uncompressed" ||
TransactionManager->MetaIndexParser->Exists(CompressedMetaKey) == true)
CompressionExtensions.append(*t).append(" ");
if (*t == "uncompressed" ||
TransactionManager->MetaIndexParser->Exists(CompressedMetaKey) == true)
CompressionExtensions.append(*t).append(" ");
if (stat(Final.c_str(),&Buf) == 0)
msg += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
if (stat(Final.c_str(),&Buf) == 0)
msg += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
msg += "\nFail-Ignore: true";
return msg;
msg += "\nFail-Ignore: true";
return msg;
{
if (CompressionExtensions.empty() == false)
{
{
if (CompressionExtensions.empty() == false)
{
- Init(Target->URI, Desc.Description, Desc.ShortDesc);
+ Init(Target.URI, Desc.Description, Desc.ShortDesc);
Status = StatIdle;
return;
}
}
Status = StatIdle;
return;
}
}
- if(Target->IsOptional && GetExpectedHashes().empty() && Stage == STAGE_DOWNLOAD)
+ if(Target.IsOptional && GetExpectedHashes().empty() && Stage == STAGE_DOWNLOAD)
Status = StatDone;
else
TransactionManager->AbortTransaction();
Status = StatDone;
else
TransactionManager->AbortTransaction();
{
// update destfile to *not* include the compression extension when doing
// a reverify (as its uncompressed on disk already)
{
// update destfile to *not* include the compression extension when doing
// a reverify (as its uncompressed on disk already)
- DestFile = GetCompressedFileName(Target->URI, GetPartialFileNameFromURI(Target->URI), CurrentCompressionExtension);
+ DestFile = GetCompressedFileName(Target.URI, GetPartialFileNameFromURI(Target.URI), CurrentCompressionExtension);
// copy FinalFile into partial/ so that we check the hash again
string FinalFile = GetFinalFilename();
// copy FinalFile into partial/ so that we check the hash again
string FinalFile = GetFinalFilename();
// If we have compressed indexes enabled, queue for hash verification
if (_config->FindB("Acquire::GzipIndexes",false))
{
// If we have compressed indexes enabled, queue for hash verification
if (_config->FindB("Acquire::GzipIndexes",false))
{
- DestFile = GetPartialFileNameFromURI(Target->URI + '.' + CurrentCompressionExtension);
+ DestFile = GetPartialFileNameFromURI(Target.URI + '.' + CurrentCompressionExtension);
EraseFileName = "";
Stage = STAGE_DECOMPRESS_AND_VERIFY;
Desc.URI = "copy:" + FileName;
EraseFileName = "";
Stage = STAGE_DECOMPRESS_AND_VERIFY;
Desc.URI = "copy:" + FileName;
{
public:
/** \brief A URI from which the index file can be downloaded. */
{
public:
/** \brief A URI from which the index file can be downloaded. */
/** \brief A description of the index file. */
/** \brief A description of the index file. */
- std::string const Description;
+ std::string Description;
/** \brief A shorter description of the index file. */
/** \brief A shorter description of the index file. */
- std::string const ShortDesc;
/** \brief The key by which this index file should be
looked up within the meta index file. */
/** \brief The key by which this index file should be
looked up within the meta index file. */
- std::string const MetaKey;
/** \brief Is it okay if the file isn't found in the meta index */
/** \brief Is it okay if the file isn't found in the meta index */
/** \brief Target specific options defined by the implementation */
/** \brief Target specific options defined by the implementation */
- std::map<std::string, std::string> const Options;
+ std::map<std::string, std::string> Options;
IndexTarget(std::string const &MetaKey, std::string const &ShortDesc,
std::string const &LongDesc, std::string const &URI, bool const IsOptional,
IndexTarget(std::string const &MetaKey, std::string const &ShortDesc,
std::string const &LongDesc, std::string const &URI, bool const IsOptional,
/** \brief baseclass for the indexes files to manage them all together */
{
protected:
/** \brief baseclass for the indexes files to manage them all together */
{
protected:
- IndexTarget const * const Target;
+ IndexTarget const Target;
HashStringList GetExpectedHashesFor(std::string const MetaKey) const;
bool QueueURI(pkgAcquire::ItemDesc &Item);
HashStringList GetExpectedHashesFor(std::string const MetaKey) const;
bool QueueURI(pkgAcquire::ItemDesc &Item);
};
virtual bool TransactionState(TransactionStates const state);
};
virtual bool TransactionState(TransactionStates const state);
- virtual std::string DescURI() const { return Target->URI; }
+ virtual std::string DescURI() const { return Target.URI; }
virtual HashStringList GetExpectedHashes() const;
virtual std::string GetMetaKey() const;
virtual bool HashesRequired() const;
virtual HashStringList GetExpectedHashes() const;
virtual std::string GetMetaKey() const;
virtual bool HashesRequired() const;
- pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const * const Target);
+ pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const Target);
virtual ~pkgAcqTransactionItem();
friend class pkgAcqMetaBase;
virtual ~pkgAcqTransactionItem();
friend class pkgAcqMetaBase;
protected:
std::vector<pkgAcqTransactionItem*> Transaction;
protected:
std::vector<pkgAcqTransactionItem*> Transaction;
- IndexTarget const DataTarget;
public:
/** \brief A package-system-specific parser for the meta-index file. */
indexRecords *MetaIndexParser;
public:
/** \brief A package-system-specific parser for the meta-index file. */
indexRecords *MetaIndexParser;
/** \brief The index files which should be looked up in the meta-index
* and then downloaded.
*/
/** \brief The index files which should be looked up in the meta-index
* and then downloaded.
*/
- const std::vector<IndexTarget*>* const IndexTargets;
+ std::vector<IndexTarget> const IndexTargets;
/** \brief If \b true, the index's signature is currently being verified.
*/
/** \brief If \b true, the index's signature is currently being verified.
*/
virtual std::string GetFinalFilename() const;
pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
virtual std::string GetFinalFilename() const;
pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- std::vector<IndexTarget*> const * const IndexTargets,
+ std::vector<IndexTarget> const IndexTargets,
IndexTarget const &DataTarget,
indexRecords* const MetaIndexParser);
};
IndexTarget const &DataTarget,
indexRecords* const MetaIndexParser);
};
/** \brief Create a new pkgAcqMetaIndex. */
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
/** \brief Create a new pkgAcqMetaIndex. */
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
- const std::vector<IndexTarget*>* const IndexTargets, indexRecords * const MetaIndexParser);
+ std::vector<IndexTarget> const IndexTargets, indexRecords * const MetaIndexParser);
friend class pkgAcqMetaSig;
};
friend class pkgAcqMetaSig;
};
pkgAcquire::MethodConfig const * const Cnf);
/** \brief Create a new pkgAcqMetaSig. */
pkgAcquire::MethodConfig const * const Cnf);
/** \brief Create a new pkgAcqMetaSig. */
- pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const * const Target,
+ pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const Target,
pkgAcqMetaIndex * const MetaIndex);
virtual ~pkgAcqMetaSig();
};
pkgAcqMetaIndex * const MetaIndex);
virtual ~pkgAcqMetaSig();
};
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget,
IndexTarget const &DetachedSigTarget,
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget,
IndexTarget const &DetachedSigTarget,
- std::vector<IndexTarget*> const * const IndexTargets,
+ std::vector<IndexTarget> const IndexTargets,
indexRecords * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
indexRecords * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
virtual std::string GetFinalFilename() const;
pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
virtual std::string GetFinalFilename() const;
pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target);
+ IndexTarget const Target);
};
/*}}}*/
/** \brief An item that is responsible for fetching an index file of {{{
};
/*}}}*/
/** \brief An item that is responsible for fetching an index file of {{{
virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf);
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf);
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
- virtual std::string DescURI() const {return Target->URI + "Index";};
+ virtual std::string DescURI() const {return Target.URI + "Index";};
virtual std::string Custom600Headers() const;
virtual std::string GetMetaKey() const;
virtual std::string Custom600Headers() const;
virtual std::string GetMetaKey() const;
* \param ShortDesc A short description of the list file to download.
*/
pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
* \param ShortDesc A short description of the list file to download.
*/
pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target);
+ IndexTarget const Target);
private:
APT_HIDDEN void QueueOnIMSHit() const;
};
private:
APT_HIDDEN void QueueOnIMSHit() const;
};
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
- virtual std::string DescURI() const {return Target->URI + "Index";};
+ virtual std::string DescURI() const {return Target.URI + "Index";};
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
* check if it was the last one to complete the download step
*/
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
* check if it was the last one to complete the download step
*/
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target,
- DiffInfo const &patch,
+ IndexTarget const Target, DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
};
/*}}}*/
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
};
/*}}}*/
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
- virtual std::string DescURI() const {return Target->URI + "IndexDiffs";};
+ virtual std::string DescURI() const {return Target.URI + "IndexDiffs";};
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
* that depends on it.
*/
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
* that depends on it.
*/
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target,
+ IndexTarget const Target,
std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
};
/*}}}*/
std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
};
/*}}}*/
virtual std::string GetMetaKey() const;
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
virtual std::string GetMetaKey() const;
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const * const Target);
+ IndexTarget const Target);
void Init(std::string const &URI, std::string const &URIDesc,
std::string const &ShortDesc);
void Init(std::string const &URI, std::string const &URIDesc,
std::string const &ShortDesc);
template<typename CallC>
void foreachTarget(std::string const URI, std::string const Dist,
std::map<std::string, std::vector<debReleaseIndex::debSectionEntry const *> > const &ArchEntries,
template<typename CallC>
void foreachTarget(std::string const URI, std::string const Dist,
std::map<std::string, std::vector<debReleaseIndex::debSectionEntry const *> > const &ArchEntries,
{
bool const flatArchive = (Dist[Dist.length() - 1] == '/');
std::string baseURI = URI;
{
bool const flatArchive = (Dist[Dist.length() - 1] == '/');
std::string baseURI = URI;
struct ComputeIndexTargetsClass
{
struct ComputeIndexTargetsClass
{
- vector <IndexTarget *> * const IndexTargets;
+ vector <IndexTarget> IndexTargets;
void operator()(std::string MetaKey, std::string ShortDesc, std::string LongDesc,
bool const IsOptional, std::map<std::string, std::string> Options)
void operator()(std::string MetaKey, std::string ShortDesc, std::string LongDesc,
bool const IsOptional, std::map<std::string, std::string> Options)
ShortDesc = SubstVar(ShortDesc, std::string("$(") + O->first + ")", O->second);
LongDesc = SubstVar(LongDesc, std::string("$(") + O->first + ")", O->second);
}
ShortDesc = SubstVar(ShortDesc, std::string("$(") + O->first + ")", O->second);
LongDesc = SubstVar(LongDesc, std::string("$(") + O->first + ")", O->second);
}
- IndexTarget * Target = new IndexTarget(
MetaKey,
ShortDesc,
LongDesc,
MetaKey,
ShortDesc,
LongDesc,
- IndexTargets->push_back(Target);
+ IndexTargets.push_back(Target);
-
- ComputeIndexTargetsClass() : IndexTargets(new vector <IndexTarget *>) {}
-vector <IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const
+std::vector<IndexTarget> debReleaseIndex::ComputeIndexTargets() const
{
ComputeIndexTargetsClass comp;
foreachTarget(URI, Dist, ArchEntries, comp);
{
ComputeIndexTargetsClass comp;
foreachTarget(URI, Dist, ArchEntries, comp);
iR->SetTrusted(false);
// special case for --print-uris
iR->SetTrusted(false);
// special case for --print-uris
- vector <IndexTarget *> const * const targets = ComputeIndexTargets();
+ std::vector<IndexTarget> const targets = ComputeIndexTargets();
#define APT_TARGET(X) IndexTarget("", X, MetaIndexInfo(X), MetaIndexURI(X), false, std::map<std::string,std::string>())
pkgAcqMetaBase * const TransactionManager = new pkgAcqMetaClearSig(Owner,
APT_TARGET("InRelease"), APT_TARGET("Release"), APT_TARGET("Release.gpg"),
#define APT_TARGET(X) IndexTarget("", X, MetaIndexInfo(X), MetaIndexURI(X), false, std::map<std::string,std::string>())
pkgAcqMetaBase * const TransactionManager = new pkgAcqMetaClearSig(Owner,
APT_TARGET("InRelease"), APT_TARGET("Release"), APT_TARGET("Release.gpg"),
#undef APT_TARGET
if (GetAll)
{
#undef APT_TARGET
if (GetAll)
{
- for (vector <IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); ++Target)
+ for (std::vector<IndexTarget>::const_iterator Target = targets.begin(); Target != targets.end(); ++Target)
new pkgAcqIndex(Owner, TransactionManager, *Target);
}
new pkgAcqIndex(Owner, TransactionManager, *Target);
}
virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
- std::vector <IndexTarget *>* ComputeIndexTargets() const;
+ std::vector<IndexTarget> ComputeIndexTargets() const;
std::string MetaIndexInfo(const char *Type) const;
std::string MetaIndexFile(const char *Types) const;
std::string MetaIndexInfo(const char *Type) const;
std::string MetaIndexFile(const char *Types) const;