[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#804317: libreoffice-dev-doc: unhandled symlink to directory conversion: /usr/share/doc/libreoffice-dev-doc/docs -> ../libreoffice-dev/docs



On 2015-11-08 10:46, Rene Engelhard wrote:
> Hi,
> 
> On Sat, Nov 07, 2015 at 10:31:54PM +0100, Andreas Beckmann wrote:
>> No, this is a different issue and requires symlink_to_dir.
>>
>> untested libreoffice-dev-doc.maintscript that should fix this:
>>
>> symlink_to_dir /usr/share/doc/libreoffice-dev-doc/docs ../libreoffice-dev/docs 1:5.0.3~rc2-2~
> 
> So that what happens? /usr/share/doc/libreoffice-dev-doc/docs will be a dir?

Yes, but don't do that - I think I have a better solution that also
fixes the mess that happened in current stretch->sid upgrades.

> There also should be noting linkable to in ./libreoffice-dev since that one's
> dh_installdocs --link-doc'ed: (That was the cause of all the mess.)
> 
> On the stretch->sid upgrade I talked about yesterday:
> 
> lrwxrwxrwx 1 root root   16 Oct 20 04:36 libreoffice-dev -> libreoffice-core

I think we have been talking about two different but entangled issues:

jessie (and up to some point stretch) shipped

libreoffice-dev-doc (1:4.3.3-2+deb8u2, up to 1:5.0.2-1):
./usr/share/doc/libreoffice-dev-doc/   (a directory)
./usr/share/doc/libreoffice-dev/docs/  (a directory)
./usr/share/doc/libreoffice-dev/docs/* (THEBIGTREE)
./usr/share/doc/libreoffice-dev-doc/docs -> ../libreoffice-dev/docs

libreoffice-dev (same versions):
./usr/share/doc/libreoffice-dev/ (a directory)

stretch at some point started using --link-doc

libreoffice-dev (1:5.0.3~rc1-1):
./usr/share/doc/libreoffice-dev -> libreoffice-core

but

libreoffice-dev-doc (same version) still shipped
./usr/share/doc/libreoffice-dev-doc/   (a directory)
./usr/share/doc/libreoffice-dev/docs/  (a directory)
./usr/share/doc/libreoffice-dev/docs/* (THEBIGTREE)
./usr/share/doc/libreoffice-dev-doc/docs -> ../libreoffice-dev/docs

This would result in installs-over-symlink issues in piuparts, but
requires testing with --install-recommends.
But piuparts found the missing copyright file issue (and therefore
didn't check for further problems, or packages were just blocked by
failing dependencies).

In 1:5.0.3~rc1-2 you fixed the copyright file issue by adding
dir_to_symlink "everywhere". This exploded on upgrades if both
libreoffice-dev-doc and libreoffice-dev are installed. These are the
bugs you are trying to fix :-)

libreoffice-dev-doc (1:5.0.3~rc1-2) still shipped
./usr/share/doc/libreoffice-dev-doc/   (a directory)
./usr/share/doc/libreoffice-dev/docs/  (a directory)
./usr/share/doc/libreoffice-dev/docs/* (THEBIGTREE)
./usr/share/doc/libreoffice-dev-doc/docs -> ../libreoffice-dev/docs

In libreoffice-dev-doc (1:5.0.3~rc2-1) this was changed to
./usr/share/doc/libreoffice-dev-doc/   (a directory)
./usr/share/doc/libreoffice-dev-doc/docs/  (a directory)
./usr/share/doc/libreoffice-dev-doc/docs/* (THEBIGTREE)

but on upgrades the symlink
./usr/share/doc/libreoffice-dev-doc/docs -> ../libreoffice-dev/docs
is retained and the THEBIGTREE actually resides in
./usr/share/doc/libreoffice-dev/docs
which I can also see in jessie->sid upgrades in piuparts
(installs-over-symlink ...)

And this is the bug I want to fix here :-)

The good thing is, dpkg still knows where THEBIGTREE resides and we
haven't cut any symlinks that would (partially) orphan it. It's just
unclear where the actual physical location is due to so many symlinks
inbetween ...

The Conflicts you added seem to work for most upgrade paths (by causing
removal and reinstallation of libreoffice-dev-doc, but not in cases
where there are not enough conflictors installed.

So here comes my proposed solution to fix this whole mess:

Has ./usr/share/doc/libreoffice-dev-doc/ ever been something else than a
directory? I don't think so.

Lets consider the locations
./usr/share/doc/libreoffice-dev-doc/docs
./usr/share/doc/libreoffice-dev/docs
as "burned" and recovering them from possible nested symlinks will be
nearly impossible. So let's move the tree away from there, e.g. to
./usr/share/doc/libreoffice-dev-doc/devdocs
(important: this directory must have never been used before)
Is the location /usr/share/doc/libreoffice-dev-doc/docs used anywhere?
* it's the target of the api link, that can be changed easily
* are there more uses or could we just drop it completely from the package?
The new libreoffice-dev-doc must not ship anything (neither symlink or
dir) as ./usr/share/doc/libreoffice-dev-doc/docs, s.t. dpkg can clean it
up together with the THEOLDBIGTREE. We cannot use symlink_to_dir since
that would break the link and dpkg would lose the connection to
THEOLDTREE, essential leaving it lingering around forever (which is
really bad for that big a tree).
If we actually need to have a docs -> devdocs symlink, it must be
maintained by maintainer scripts (postinst configure, better *after*
#DEBHELPER#, and prerm remove).

With this "moving the install location" we could also relax the
conflicts a bit.


Can you give me some hints how to speed up building libreoffice
packages, since all I'm interested in testing maintainer script changes ...


Andreas


Reply to: