]> git.saurik.com Git - apt.git/commitdiff
fix crash
authorMichael Vogt <mvo@ubuntu.com>
Wed, 1 Oct 2014 22:47:33 +0000 (00:47 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Wed, 1 Oct 2014 22:47:33 +0000 (00:47 +0200)
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h

index 54e99345865587a1fe725c4fb21bf244c59b8a52..afc7ae20b6ae2b4358cb106d776162619d3a88ec 100644 (file)
@@ -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);
index 5d5d6efb9e8f01374e13bda3bbb177134c4538d6..fbbca8bf28776c3178edcfa51357775eaef54498 100644 (file)
@@ -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   {{{