why is my symlink gone????

Jeffrey Johnson n3npq at me.com
Mon Jan 9 00:11:52 CET 2012


On Jan 8, 2012, at 5:37 PM, glen wrote:

> On 01/09/2012 12:07 AM, glen wrote:
>> i tried to find what is so special in there, %files is just the topdir where all goes in 
> 
> nailed it!
> 

Nice!

> i mean i found symptom that could really explain it.
> 

Wuss ;-) You nailed the common identifying factor. Poifect!

> http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/test/test.spec?revision=1.16.4.69.2.4.2.1.4.3&view=markup <http://cvs.pld-linux.org/cgi-bin/viewvc.cgi/cvs/packages/test/test.spec?revision=1.16.4.69.2.4.2.1.4.3&view=markup>
> 
> so symlinks who have nlink > 1 are problematic: not installed into system:
> 

This is a hard link to a symlink which is pretty obscure functionality.

(aside)
I'm not sure I've ever seen or needed a hard linked symlink in a lifetime of
using uglix.

<snip>

But what rpm does with hard links is this:

With cpio, there are headers with paths in the payload before
the (usually, not here) file that carries the content to be written
to the file system. The hard links are saved as encountered, waiting
for the last header to appear.

When the last header appears, the other hard links are created as a side effect
of writing the content.

There are complexities here that have to do with --excludepath as well
as policies related to selecting some but not all of the hard linked
files for installation. The point is that not all the files in a hardline
set are always installed.

Since the trigger here is the appearance of a file with content attached, I'm
not too surprised (since I wrote the code and have never seen/needed
a hardlinked symlink in my life on uglix) that this isn't handled
correctly by the file state machine code (aka "fsm") in rpm.

The simple answer is
	Don't use hard linked symlinks in packages.

The more general answer is considerably messier because of the
need to consider the case of not just a file but also a symlink
which might be hard linked.

Doable for sure, just not sure there is need.

The issue affects all versions of rpm everywhere afaik.

Bug added here
	https://bugs.launchpad.net/rpm/+bug/913572

73 de Jeff



More information about the pld-devel-en mailing list