home *** CD-ROM | disk | FTP | other *** search
- From: mmengel@cuuxb.uucp (Marc W. Mengel)
-
- In article <8440@ut-sally.UUCP>;
- >I noted Marc Mengel's suggestion that tar write out the contents of a file
- >when the last link to a file is encountered, rather than the first. This
- >would be nice, but I don't see how it could be done in a way that is
- >backward compatible with the current tar format.
-
-
- Maybe I was too brief in my attempt at describing it... What you do
- is make two recursive descents of the directory tree.
-
- In the first recursive descent, you generate a table that looks like
-
- file id # last place seen in recursive descent
- 123 foo/bar/baz
- 333 foo/baz/bleem
- ...
-
- Each time you encounter a file in the recursive descent you either add it
- to the list, if its file id # isn't there, or replace its pathname in
- the second half of the table.
-
- In the second recursive descent, you look up each file you see in the table,
- (by file id #) and if its path-from-the-table matches the current path,
- you write out the file on the archive, otherwise you mark the current
- path as a link to path-from-the-table in the archive.
-
- Since our two recursive descents of the file tree should be identical, we
- should always have only the last reference to a given file with data, and
- all earlier references to that file listed as links to the one later on
- the archive.
-
- (Of course we only need to put files in the table that have multiple
- links...)
-
- So I am asking that a notation be put in the tar archive format for a
- link to another file in the archive, along with the requirement that
- link-to-file-"foo" nodes in the archive must always precede file-"foo"
- nodes.
-
-
- [ If you want to make a proposal to the P1003.1 Working Group,
- you need to supply actual wording for the standard. -mod ]
-
- --
- Marc Mengel
- attmail!mmengel
- or
- ...!{moss|lll-crg|mtune|ihnp4}!cuuxb!mmmengel
-
-
- Volume-Number: Volume 11, Number 90
-
-