> This is not a bug. This is a feature which has been supported by dpkg > for ages.
[snip] > Well, this is Unix after all, and Unix has hardlinks. If your backup > software complains, use another backup software, or find the option > to disable the complain. It is true that Unix has hardlinks. It is also true that dpkg supports this. Unix also supports rm -rf'ing root, and dpkg probably supports doing that in a package maintainer script, so I don't really find either of these arguments compelling. The reason to avoid hard links isn't just because one particular person's backup software gripes when it hits them. Backup software probably should be handling hardlinks correctly. But that doesn't mean hardlinks should be used in a place where a symlink will work. The primary reason is traceability - it's possible (and even easy) to determine if a file has more than one hardlink, but it's much more difficult to figure out where those other hardlinks *are* - you have to scan the entire filesystem to determine with absolute certainty where every hardlink to any particular file is, which is a lengthy operation that may introduce too much of a performance hit to be acceptable in a practical application. With no way to know where the "real" file is (thanks to there not being a real file in the first place), you basically now have something that acts like a symlink but that is indistinguishable from a real file, you can't choose to not follow it, you can't choose to follow it and ignore the link, it's just a massive pain. If you're using a real programming language like C or whatever, you might be able to do some performance optimizations to let you handle hardlinks faster if you're scanning the whole filesystem anyway, but if you're using a shell script, then you're sunk, and if you weren't already scanning the whole filesystem, you're sunk. Here, a hardlink is only used to reduce space consumption a bit by making unzip and zipinfo the same file. AFAICT, a symlink would perform exactly the same task and avoid the aforementioned headaches of hardlinks. FWIW, both bzip2[1] and gzip[2] have chosen to stop using hardlinks in their packaging. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041241 [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041239
pgpmzahQCEJIq.pgp
Description: OpenPGP digital signature