home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 22509 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  2.9 KB

  1. Path: sparky!uunet!olivea!sgigate!rutgers!cmcl2!cs!fox
  2. From: fox@cs.nyu.edu (David Fox)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: A discipline for packages
  5. Message-ID: <FOX.93Jan2225646@graphics.nyu.edu>
  6. Date: 3 Jan 93 03:56:46 GMT
  7. References: <T8BmwB1w165w@kf8nh.wariat.org> <1992Dec31.022954.5807@sol.UVic.CA>
  8.     <1993Jan1.201620.26986@nwnexus.WA.COM>
  9.     <1993Jan1.212511.20678@sol.UVic.CA>
  10.     <1993Jan2.055744.26567@nwnexus.WA.COM> <bk^Q7dBX@twinsun.com>
  11. Sender: notes@cmcl2.nyu.edu (Notes Person)
  12. Organization: Courant Institute of Mathematical Sciences
  13. Lines: 45
  14. In-Reply-To: junio@twinsun.com's message of Sat, 2 Jan 1993 09:44:24 GMT
  15. Nntp-Posting-Host: graphics.cs.nyu.edu
  16.  
  17. In article <bk^Q7dBX@twinsun.com> junio@twinsun.com (Jun Hamano) writes:
  18.  
  19.    Two more important reasons why a symbolic link is a nightmare
  20.    are:
  21.  
  22.    (1) with a hard link, you can tell a file is pointed at by
  23.    somebody else by looking at the target file, but a target file a
  24.    symbolic file is pointing at doesn't know it is pointed at by
  25.    somebody else at all; after removing such a file, the symbolic
  26.    link pointing to it becomes an useless dangling link (it points
  27.    to an non-existent file).  With a hard link, you don't have this
  28.    problem; the original disappears from the directory structure,
  29.    but the file itself is not removed as long as any hard link is
  30.    pointing to it.
  31.  
  32.    (2) with symbolic links, you have to be very careful not to tar
  33.    off symbolic links without tarring the originals they are
  34.    pointing at (unless the targets are well-known places in the
  35.    directory tree); otherwise, when you unpack the tar archive, you
  36.    will have only pointers and no real data ---useless dangling link
  37.    again.
  38.  
  39. While these are indeed properties of symbolic links, you
  40. can as easily view them as blessings as nightmares.  We are
  41. proposing to install the files for a package in one directory
  42. tree and create symbolic links in the "guts" of the file
  43. system.  The nice thing about symbolic links is that they
  44. can tell you where they are pointing, whereas all you know about
  45. a hard link is how many other names it has.  To de-install the
  46. foo package you just remove every symbolic link anywhere that
  47. points to /packages/foo/* and then rm -rf /packages/foo/*.  If
  48. you have a dangling link into /packages/foo/* you just get the
  49. foo distribution and extract the missing file.  If it is not there,
  50. the link is not needed in this new version of foo and you can
  51. remove it; but there is no need to.  There is also little danger
  52. of point (2), a distribution containing links but missing the real
  53. files; if the distributer did a "tar cf - /packages/foo" there is no
  54. way they will omit any real files.  The tricky part is including
  55. all the necessary links, but I don't think it is that tricky.
  56.  
  57. Furthermore, if you want to try out foo-1.3alpha you just make
  58. /packages/foo a symbolic link to /packages/foo-1.3alpha.  The
  59. benefits are numerous.
  60.  
  61. -david
  62.