diff options
author | psg <> | 2009-10-25 16:12:52 +0000 |
---|---|---|
committer | psg <> | 2009-10-25 16:12:52 +0000 |
commit | ff1a4c222dc12d8be7a8b776a17d6d08f9b8f869 (patch) | |
tree | 7b449a2084e783fe2282678f326778f3eb2abc80 /deb-view.el | |
parent | a6eb73f2cd2ca87be691d2a4639b36681c34552c (diff) |
debian-el:
deb-view.el: Added support for data.tar.bz2 deb files (Closes: #457094).
Diffstat (limited to 'deb-view.el')
-rw-r--r-- | deb-view.el | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/deb-view.el b/deb-view.el index 4a602db..15a06bd 100644 --- a/deb-view.el +++ b/deb-view.el @@ -1,11 +1,11 @@ ;;; deb-view.el --- view Debian package files with tar-mode ;; Copyright (C) 1998 Rick Macdonald <rickmacd@shaw.ca> -;; Copyright (C) 2003, 2004 Peter S Galbraith <psg@debian.org> +;; Copyright (C) 2003, 2004, 2005, 2009 Peter S Galbraith <psg@debian.org> ;; Author: Rick Macdonald <rickmacd@shaw.ca> ;; Maintainer: Peter S. Galbraith <psg@debian.org> -;; Version: 1.10 +;; Version: 1.14 ;; This file is not part of GNU Emacs. @@ -224,6 +224,8 @@ ;; caused the problem. So the solution is to bind ;; default-process-coding-system as well in deb-view-process +;; 1.14 2009-10-25 Peter S. Galbraith <psg@debian.org> +;; Added support for data.tar.bz2 deb files (Closes: #457094). ;;; Code: @@ -411,13 +413,26 @@ at the prompt." (buffer-disable-undo) (cond (new-archive-format - (call-process "ar" nil '(t t) nil "-p" debfile "data.tar.gz") - (goto-char (point-max)) - (when (search-backward "is not a valid archive" nil t) - (kill-buffer data-buffer) - (kill-buffer info-buffer) - (error "%s: Not a valid package file" deb-view-buffer-name)) - (call-process-region (point-min) (point-max) "gzip" t t nil "-cd")) + (call-process "ar" nil '(t t) nil "-t" debfile) + (cond + ((re-search-forward "data.tar.gz" nil t) + (erase-buffer) + (call-process "ar" nil '(t t) nil "-p" debfile "data.tar.gz") + (goto-char (point-max)) + (when (search-backward "is not a valid archive" nil t) + (kill-buffer data-buffer) + (kill-buffer info-buffer) + (error "%s: Not a valid package file" deb-view-buffer-name)) + (call-process-region (point-min) (point-max) "gzip" t t nil "-cd")) + ((and (goto-char 1)(re-search-forward "data.tar.bz2" nil t)) + (erase-buffer) + (call-process "ar" nil '(t t) nil "-p" debfile "data.tar.bz2") + (goto-char (point-max)) + (when (search-backward "is not a valid archive" nil t) + (kill-buffer data-buffer) + (kill-buffer info-buffer) + (error "%s: Not a valid package file" deb-view-buffer-name)) + (call-process-region (point-min) (point-max) "bzip2" t t nil "-cd")))) (t (call-process shell-file-name nil t nil shell-command-switch (concat "dpkg-deb --fsys-tarfile " debfile)))) |