Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554190 - qt5-build.eclass: implement subslotting
Summary: qt5-build.eclass: implement subslotting
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 523616 577682
  Show dependency tree
 
Reported: 2015-07-08 00:14 UTC by Davide Pesavento
Modified: 2016-04-23 17:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento gentoo-dev 2015-07-08 00:14:51 UTC
See e.g. bug 523616 for the reason and some discussion.
Comment 1 Davide Pesavento gentoo-dev 2015-07-08 00:23:59 UTC
I'll repeat it here:

Do NOT randomly add := subslot dependencies to your packages just because they link against the Qt libraries.
Depending on a specific subslot or using := is ONLY for those packages that use one or more Qt *private* APIs.
Qt public APIs (those used by 99% of the packages) guarantee binary compatibility until the next major version (Qt 6).
Comment 3 Michael Palimaka (kensington) gentoo-dev 2015-07-09 10:38:27 UTC
mgorny is against introducing this because it is not the most common use case for subslots. I disagree, because this solves severe silent breakage in Plasma 5.
Comment 4 Davide Pesavento gentoo-dev 2015-07-09 12:13:18 UTC
FTR, I'm neutral on this matter.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-07-09 15:35:58 UTC
The problem is that you're adding yet another rule to the huge list of 'how to write dependencies properly'. This means that writing ebuilds will get even worse because people will have to remember that subslots in Qt are special, which the same awful, terrible stupidity as poppler.

From the other bug, I can't judge how wide the need for this is. However, I think the simplest solution would be an extra virtual package that would hold the subslot for private APIs. Like libudev/libgudev virtuals.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2015-07-10 15:20:44 UTC
The problem with poppler is that people were asked to add the dep with clarifying in which situations it should be used.

Knowing when to use the right subslot is no bigger burden that knowing which slot of eg. virtual/jpeg to use.
Comment 7 Davide Pesavento gentoo-dev 2015-08-22 02:03:10 UTC
So, can we reach a decision here? I'd like to import Qt 5.5 from the overlay.
Comment 8 Michael Palimaka (kensington) gentoo-dev 2015-08-22 06:29:56 UTC
There is no policy requiring subslots to be used in any particular way, so I think the implementation in the overlay is fine. There's no other way for us to automatically fix breakage caused by private ABI changes - it does not appear to be detected by revdep-rebuild or preserved-libs.

I don't think "I can't be bothered to write correct dependencies" is a good reason to not implement this.
Comment 9 Davide Pesavento gentoo-dev 2015-10-29 02:20:17 UTC
FYI, this https://codereview.qt-project.org/126845 should help a lot for future versions (post 5.6.0)
Comment 10 Michael Palimaka (kensington) gentoo-dev 2015-12-06 08:41:22 UTC
(In reply to Davide Pesavento from comment #9)
> FYI, this https://codereview.qt-project.org/126845 should help a lot for
> future versions (post 5.6.0)

Additionally, since we can now describe subslot meaning in metadata.xml and breakage observed in multiple packages with 5.5 I would still like this to go ahead.
Comment 11 Michael Palimaka (kensington) gentoo-dev 2016-01-14 11:24:38 UTC
I'd like to update the various metadata.xml with a subslot description, something like:

        <slots>
                <subslots>
                        Must only be used by packages that are known to use private parts of the Qt API.
                </subslots>
        </slots>
Comment 12 Michael Palimaka (kensington) gentoo-dev 2016-01-14 11:26:00 UTC
(In reply to Davide Pesavento from comment #9)
> FYI, this https://codereview.qt-project.org/126845 should help a lot for
> future versions (post 5.6.0)

Is anyone familiar with working with symbols? I wasn't yet able to match any of the symbols marked with Qt_5_PRIVATE_API with those used in packages known to use the private API.
Comment 14 Davide Pesavento gentoo-dev 2016-03-13 23:43:17 UTC
(In reply to Michael Palimaka (kensington) from comment #12)
> Is anyone familiar with working with symbols? I wasn't yet able to match any
> of the symbols marked with Qt_5_PRIVATE_API with those used in packages
> known to use the private API.

Yes, sorry for the delay. You can use either objdump or readelf:

$ objdump -CTw /usr/lib64/libQt5Xml.so.5.6.0 | grep -F Qt_5_PRIVATE_API
0000000000000000      DF *UND*	0000000000000000  Qt_5_PRIVATE_API QXmlUtils::isChar(QChar)
0000000000000000      DF *UND*	0000000000000000  Qt_5_PRIVATE_API QXmlUtils::isLetter(QChar)
0000000000000000      DF *UND*	0000000000000000  Qt_5_PRIVATE_API QXmlUtils::isNameChar(QChar)
0000000000000000      DF *UND*	0000000000000000  Qt_5_PRIVATE_API QXmlUtils::isPublicID(QString const&)
0000000000000000 g    DO *ABS*	0000000000000000  Qt_5_PRIVATE_API Qt_5_PRIVATE_API

$ readelf -sW /usr/lib64/libQt5Xml.so.5.6.0 | c++filt | grep -F Qt_5_PRIVATE_API
    28: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND QXmlUtils::isChar(QChar)@Qt_5_PRIVATE_API (13)
    63: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND QXmlUtils::isLetter(QChar)@Qt_5_PRIVATE_API (13)
    64: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND QXmlUtils::isNameChar(QChar)@Qt_5_PRIVATE_API (13)
    65: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND QXmlUtils::isPublicID(QString const&)@Qt_5_PRIVATE_API (13)
   423: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS Qt_5_PRIVATE_API
Comment 15 Davide Pesavento gentoo-dev 2016-04-23 12:28:46 UTC
(In reply to Michael Palimaka (kensington) from comment #11)
> I'd like to update the various metadata.xml with a subslot description,
> something like:
> 
>         <slots>
>                 <subslots>
>                         Must only be used by packages that are known to use
> private parts of the Qt API.
>                 </subslots>
>         </slots>

was this implemented? we should do it now before moving 5.6 to the tree.
Comment 16 Alex Xu (Hello71) 2016-04-23 13:03:43 UTC
Another option is to put it in repoman.
Comment 17 Alex Xu (Hello71) 2016-04-23 13:14:52 UTC
(In reply to Alex Xu (Hello71) from comment #16)
> Another option is to put it in repoman.

Never mind, that doesn't make any sense.
Comment 18 Michael Palimaka (kensington) gentoo-dev 2016-04-23 17:25:18 UTC
Thanks everyone, added as part of 5.6.0 version bump.