#783924 dh-linktree: "replace" is unable to replace directory with symlink

#783924#5
Date:
2015-05-01 10:17:38 UTC
From:
To:
Package I am working on bundles "php-htmlpurifier" which I'm trying to replace
using `dh-linktree` which fails on attempt to replace directory
"HTMLPurifier/DefinitionCache/Serializer" with
"/usr/share/php/HTMLPurifier/DefinitionCache/Serializer" (symlink):

    dh_linktree: link destination [...] is a directory
---

Good luck happens when preparedness meets opportunity.

#783924#10
Date:
2015-05-01 12:48:59 UTC
From:
To:
Hi,

Solving this means that you have to remove the content of the whole
directory which is conflicting with the target symlink. Is this really
the desired result?

Let's assume that the directory is "plugins" and contains custom plugins
added by the application we're packaging... we clearly would like to
preserve those custom plugins and not replace them by the default
set of plugins shipped by the official packaged version of that directory.

So the right answer might well be to not replace the directory but to
recurse into the symlink contained in the original package.

I don't really have the time/motivation to work on dh-linktree so it would
be nice if you could try to provide patches for those issues. The package
is in collab-maint so that anyone can help. :-)

Cheers,

#783924#15
Date:
2015-05-01 13:37:35 UTC
From:
To:
In this particular case it is...

Right, I need to think more about this... Probably it is a name of action
suggests that destination shall be, well, replaced... I agree that some kind
of merge may be better but then we'll have another problem: php-htmlpurifier's
"DefinitionCache/Serializer" is a symlink to directory readable only by "www-
data" so dh_linktree would not be able to scan it...

I think I have some improvement ideas but also little time on my hands...
I'll be happy to help if time allows. Stay tuned... :)
--- A creative man is motivated by the desire to achieve, not by the desire to beat others. -- Ayn Rand