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