]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid
[apt.git] / apt-pkg / acquire-item.cc
index 253cbdaf72648620e1898f49fc6d21b3734d331c..0bcafdc5c7eee0d65ddd1022335c899f57f54b6c 100644 (file)
@@ -1194,8 +1194,18 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash,
    Desc.URI = decompProg + ":" + FileName;
    QueueURI(Desc);
 
-   // FIXME: this points to a c++ string that goes out of scope
-   Mode = decompProg.c_str();
+   if (decompProg == "copy")
+      Mode = "copy";
+   else if (decompProg == "xz")
+      Mode = "xz";
+   else if (decompProg == "lzma")
+      Mode = "lzma";
+   else if (decompProg == "bzip2")
+      Mode = "bzip2";
+   else if (decompProg == "gzip")
+      Mode = "gzip";
+   else
+      Mode = "decomp";
 }
                                                                        /*}}}*/
 // AcqIndexTrans::pkgAcqIndexTrans - Constructor                       /*{{{*/