bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19481: package.el: support .tar archives featuring a pax_global_head


From: Lars Ingebrigtsen
Subject: bug#19481: package.el: support .tar archives featuring a pax_global_header entry
Date: Thu, 13 Aug 2020 11:01:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It doesn't look like these changes were applied -- are they still of
>> interest, or is the pax_global_header entry not supported any more?
>
> Yes, they are definitely still relevant and should be applied.  I think
> they've not been applied simply because we were waiting for the tests.

I think this was fixed in a different way in 2016 by Noam:

(defun tar--describe-as-link (descriptor)
  (let ((link-p (tar-header-link-type descriptor)))
    (if link-p
        (cond ((eq link-p 5) "a directory")
              ((eq link-p 20) "a tar directory header")
              ((eq link-p 28) "a next has longname")
              ((eq link-p 29) "a multivolume-continuation")
              ((eq link-p 35) "a sparse entry")
              ((eq link-p 38) "a volume header")
              ((eq link-p 55) "a pax global extended header")
              ((eq link-p 72) "a pax extended header")
              (t "a link")))))

(defun tar--check-descriptor (descriptor)
  (let ((link-desc (tar--describe-as-link descriptor)))
    (when link-desc
      (error "This is %s, not a real file" link-desc))))

So tar-mode displays these headers like this:

 Hrw-rw-rw-    root/root         52 pax_global_header
 drwxrwxr-x    root/root          0 pax-test/
 -rw-rw-r--    root/root          5 pax-test/foo

Which isn't unreasonable...

For reference, I've included a tar file that has one of these headers
here.

So is this still something that should be applied?  If I read Ivan's
patch correctly, it will make tar-mode just ignore those pax headers,
which seems a bit heavy-handed...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

Attachment: pax-test.tar
Description: Unix tar archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]