Frank Lichtenheld <[EMAIL PROTECTED]> wrote:

> You can rmdir the directory in the postinst (because it should be empty
> then) and then create the symlink manually. This is the most
> common solution I've found in existing packages and it looks
> reasonably sane and safe.

Yes, this is what I was planning to do.  I'll do it in such a way that
if the directory isn't empty for some reason, it won't prevent the
upgrade from succeeding.

> The reason why dpkg doesn't replace symlinks with directories is
> probably to allow the local user/admin to relocate a directory tree
> and symlink it without breaking dpkg usage.

Very sound.  Makes sense.

> The reason why dpkg doesn't replace directories with symlinks is
> probably because this would effectively require a rm -fr on the
> directory (or the creation of potentially very big backups)
> which is not a very good thing to do non-interactively.

Yes, I had more or less come to this same conclusion.  I was thinking
through the cases after I sent my email.  If it handled non-empty
directories as a special case, it would create more confusion than it
was worth dealing with....for example, there could be bugs were
upgrades succeed but result in incorrect packages if the user has
edited a file in a directory and created a backup but not in other
cases....better to have it behave uniformly.

Anyway, I'm convinced and need no further followups.  I'll fix my
package and upload after I get back from a weekend away.

Thanks for the quick responses.

--Jay


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to