summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-10-02 00:47:33 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-10-02 00:47:33 +0200
commita64bf0eb7a4e0a6fbb19d19efabecd709a19b917 (patch)
treeba9e0e9393e6be26124c0e7eee07443491db42fd /apt-pkg
parent1e8ba0d4087f72a930a588ce5fbf0c22dddb9403 (diff)
fix crash
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc20
-rw-r--r--apt-pkg/acquire-item.h5
2 files changed, 14 insertions, 11 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 54e993458..afc7ae20b 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -269,12 +269,12 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
HashStringList const &ExpectedHashes,
indexRecords *MetaIndexParser)
: pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes,
- MetaIndexParser, Target->URI),
- PackagesFileReadyInPartial(false)
+ MetaIndexParser), PackagesFileReadyInPartial(false)
{
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
+ RealURI = Target->URI;
Desc.Owner = this;
Desc.Description = Target->Description + "/DiffIndex";
Desc.ShortDesc = Target->ShortDesc;
@@ -576,8 +576,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
indexRecords *MetaIndexParser,
string ServerSha1,
vector<DiffInfo> diffs)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes,
- MetaIndexParser, Target->URI),
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser),
available_patches(diffs), ServerSha1(ServerSha1)
{
@@ -586,6 +585,7 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
+ RealURI = Target->URI;
Desc.Owner = this;
Description = Target->Description;
Desc.ShortDesc = Target->ShortDesc;
@@ -799,8 +799,7 @@ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner,
indexRecords *MetaIndexParser,
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
- : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes,
- MetaIndexParser, Target->URI),
+ : pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHashes, MetaIndexParser),
patch(patch), allPatches(allPatches), State(StateFetchDiff)
{
@@ -809,6 +808,7 @@ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner,
Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
+ RealURI = Target->URI;
Desc.Owner = this;
Description = Target->Description;
Desc.ShortDesc = Target->ShortDesc;
@@ -957,8 +957,10 @@ bool pkgAcqBaseIndex::VerifyHashByMetaKey(HashStringList const &Hashes)
pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
string URI,string URIDesc,string ShortDesc,
HashStringList const &ExpectedHash)
- : pkgAcqBaseIndex(Owner, 0, NULL, ExpectedHash, NULL, RealURI)
+ : pkgAcqBaseIndex(Owner, 0, NULL, ExpectedHash, NULL)
{
+ RealURI = URI;
+
AutoSelectCompression();
Init(URI, URIDesc, ShortDesc);
@@ -975,8 +977,10 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
HashStringList const &ExpectedHash,
indexRecords *MetaIndexParser)
: pkgAcqBaseIndex(Owner, TransactionManager, Target, ExpectedHash,
- MetaIndexParser, Target->URI)
+ MetaIndexParser)
{
+ RealURI = Target->URI;
+
// autoselect the compression method
AutoSelectCompression();
Init(Target->URI, Target->Description, Target->ShortDesc);
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 5d5d6efb9..fbbca8bf2 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -619,10 +619,9 @@ class pkgAcqBaseIndex : public pkgAcquire::Item
pkgAcqMetaBase *TransactionManager,
struct IndexTarget const * const Target,
HashStringList const &ExpectedHashes,
- indexRecords *MetaIndexParser,
- std::string RealURI)
+ indexRecords *MetaIndexParser)
: Item(Owner, ExpectedHashes, TransactionManager), Target(Target),
- MetaIndexParser(MetaIndexParser), RealURI(RealURI) {};
+ MetaIndexParser(MetaIndexParser) {};
};
/*}}}*/
/** \brief An item that is responsible for fetching an index file of {{{