Subject: Package installer corrupts image & zip files

From: Jambunathan K <[email-masked]>
Date: Wed, 15 Jun 2011 10:32:07 -0400

[ Use M-x report-emacs-bug rather than a [BUG] tag in the subject line.  ]

Would it be possible to address the following bug before my
OpenDocumentText exporter lands in elpa? I will also file a formal bug
report in few hours.

Summary:

I distribute an image file (png) and a OpenOffice extension (oxt) file
as part of the bundle. These files are getting mangled by the package
installer.

Steps for reproduction:

1. Update package-archives to point to my archive

--8<---------------cut here---------------start------------->8---
(setq package-archives
      '(("gnu" . "http://elpa.gnu.org/packages/")
	("org-odt" . "http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/packages/")))
--8<---------------cut here---------------end--------------->8---

2. Install the org-odt package.

3. Visit the following files:
   ~/.emacs.d/elpa/org-odt-20110613/contrib/odt/files/org-mode-unicorn.png
   ~/.emacs.d/elpa/org-odt-20110613/contrib/odt/BasicODConverter-0.8.0.oxt

   Note that the above two files are corrupt. (oxt file is a zip archive)

4. Visit these files in the downloaded tar. Note that they are sane.

Jambunathan K.