- Dont munge package names on download. Add new configuration option
authorpmatilai <pmatilai>
Sun, 28 May 2006 11:57:52 +0000 (11:57 +0000)
committerpmatilai <pmatilai>
Sun, 28 May 2006 11:57:52 +0000 (11:57 +0000)
  Acquire::Munge-Filenames to allow reverting to old behavior.

apt-pkg/acquire-item.cc

index b57a11f..69b4b70 100644 (file)
@@ -702,10 +702,14 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
         return;
             
       // Generate the final file name as: package_version_arch.foo
-      StoreFilename = QuoteString(Version.ParentPkg().Name(),"_:") + '_' +
-                     QuoteString(Version.VerStr(),"_:") + '_' +
-                     QuoteString(Version.Arch(),"_:.") + 
-                     "." + flExtension(Parse.FileName());
+      if (_config->FindB("Acquire::Munge-Filenames", false) == true) {
+        StoreFilename = QuoteString(Version.ParentPkg().Name(),"_:") + '_' +
+                        QuoteString(Version.VerStr(),"_:") + '_' +
+                        QuoteString(Version.Arch(),"_:.") + 
+                        "." + flExtension(Parse.FileName());
+      } else {
+        StoreFilename = Parse.FileName();
+      }
    }
       
    // Select a source