Package: apt-utils
Version: 0.7.14+b1
Severity: normal
File: /usr/bin/apt-extracttemplates
Tags: patch

Hi

apt-extracttemplates complains that deb is "not a valid DEB package"
while dpkg has no problem handling this particullar package. The problem
is caused by fact, that the package was manually created by GNU Ar,
which adds trailing / to file names (to allow spaces in names). This
situation is correctly handled by dpkg, but apt does not seem to handle
this.

Attached patch should fix this issue (it works with my test package).

-- 
        Michal Čihař | http://cihar.com | http://blog.cihar.com
diff -Nru apt-0.7.15~exp3/apt-inst/contrib/arfile.cc apt-0.7.15~exp3+nmu1/apt-inst/contrib/arfile.cc
--- apt-0.7.15~exp3/apt-inst/contrib/arfile.cc	2008-06-09 23:10:08.000000000 +0200
+++ apt-0.7.15~exp3+nmu1/apt-inst/contrib/arfile.cc	2008-10-03 09:59:50.000000000 +0200
@@ -111,7 +111,7 @@
       else
       {
 	 unsigned int I = sizeof(Head.Name) - 1;
-	 for (; Head.Name[I] == ' '; I--);
+	 for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--);
 	 Memb->Name = string(Head.Name,I+1);
       }
 

Attachment: signature.asc
Description: PGP signature

Reply via email to