]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/package-x.el
Fix recent bootstrap problems
[gnu-emacs] / lisp / emacs-lisp / package-x.el
index e0945d47a4573203d089a6509e455fd7a49ed3ed..81d0b834722f9de01b5cf295e6c45cce4be1480e 100644 (file)
@@ -156,6 +156,7 @@ DESCRIPTION is the text of the news item."
                               archive-url))
 
 (declare-function lm-commentary "lisp-mnt" (&optional file))
+(defvar tar-data-buffer)
 
 (defun package-upload-buffer-internal (pkg-desc extension &optional archive-url)
   "Upload a package whose contents are in the current buffer.
@@ -247,7 +248,7 @@ if it exists."
                             (concat (symbol-name pkg-name) "-readme.txt")
                             package-archive-upload-base)))
 
-           (set-buffer pkg-buffer)
+           (set-buffer (if (eq file-type 'tar) tar-data-buffer pkg-buffer))
            (write-region (point-min) (point-max)
                          (expand-file-name
                           (format "%s-%s.%s" pkg-name pkg-version extension)