Package: apt
Version: 0.8.16~exp12
Severity: grave
Tags: patch experimental
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise

The recent changes to compression handling in apt-pkg/indexcopy.cc broke
apt-cdrom:

  https://bugs.launchpad.net/bugs/924182

I think the right answer is to use FileFd::Auto rather than
FileFd::Extension in the two relevant parts of indexcopy.cc, so that
FileFd will iterate through compression types rather than assuming that
the compression type will be encoded in the file extension, which isn't
the case here.

=== modified file 'apt-pkg/indexcopy.cc'
--- apt-pkg/indexcopy.cc        2011-12-19 13:42:48 +0000
+++ apt-pkg/indexcopy.cc        2012-01-31 10:30:00 +0000
@@ -85,7 +85,7 @@ bool IndexCopy::CopyPackages(string CDRO
       string OrigPath = string(*I,CDROM.length());
       
       // Open the package file
-      FileFd Pkg(*I + GetFileName(), FileFd::ReadOnly, FileFd::Extension);
+      FileFd Pkg(*I + GetFileName(), FileFd::ReadOnly, FileFd::Auto);
       off_t const FileSize = Pkg.Size();
 
       pkgTagFile Parser(&Pkg);
@@ -797,7 +797,7 @@ bool TranslationsCopy::CopyTranslations(
       string OrigPath = string(*I,CDROM.length());
 
       // Open the package file
-      FileFd Pkg(*I, FileFd::ReadOnly, FileFd::Extension);
+      FileFd Pkg(*I, FileFd::ReadOnly, FileFd::Auto);
       off_t const FileSize = Pkg.Size();
 
       pkgTagFile Parser(&Pkg);

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to