Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 462138 - [Future EAPI] Subslot dictionaries
Summary: [Future EAPI] Subslot dictionaries
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
: 501656 (view as bug list)
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2013-03-18 04:14 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2020-10-14 23:31 UTC (History)
7 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 Arfrever Frehtes Taifersar Arahesis 2013-03-18 04:14:54 UTC
Some packages have multiple "ABIs", which can change independently in new versions.

- Packages with multiple libraries, which have sonames with different versions.
  Example:
    app-text/poppler-0.22.2 (SLOT="0/35") has libraries with these sonames:
      libpoppler.so.35
      libpoppler-cpp.so.0
      libpoppler-glib.so.8
      libpoppler-qt4.so.4
    Between app-text/poppler-0.22.1 and app-text/poppler-0.22.2, there was
    change in soname of main library from libpoppler.so.34 to libpoppler.so.35.
    Sonames of other libraries did not change.

- Packages with special requirement of rebuilding.
  Example:
    dev-libs/gobject-introspection should be rebuilt after each
    upgrade/downgrade of dev-libs/glib, regardless of lack of changes in
    sonames of dev-libs/glib libraries. Other packages, which depend on
    dev-libs/glib, do not need to be rebuilt so often.

Suggested solution:
Ebuilds should be able to set subslot as a dictionary of multiple key:value elements, separated by commas. Packages, which depend on given package, would be able to specify, which keys should be used, using :=(key1,key2,...) slot operators etc.

Optionally 1 key could be specified as default key, using "*" prefix before key.
If package B depends on package A without specifying used keys, then:
  If default key is specified in package A, then this key will be used.
  If default key is not specified in package A, then all keys will be used.

SLOT syntax introduced in EAPI="5" will remain allowed, but slot operators with named keys could not be used for packages, which use that syntax.

Examples:

app-text/poppler-0.22.2 could set SLOT="0/main:35,cpp:0,glib:8:qt4:4".
app-office/libreoffice could depend on ">=app-text/poppler-0.16:=(main)[xpdf-headers(+),cxx]".
kde-base/okular[pdf] could depend on ">=app-text/poppler-0.20:=(qt4)[qt4,-exceptions(-)]".
media-gfx/gimp[pdf] could depend on ">=app-text/poppler-0.12.4:=(glib)[cairo]".

dev-libs/glib-2.34.3 could set SLOT="2/*main:0,gi:${PV}".
dev-libs/gobject-introspection could depend on ">=dev-libs/glib-2.34.1:2=(gi)".
Comment 1 Arfrever Frehtes Taifersar Arahesis 2013-03-18 04:19:08 UTC
(In reply to comment #0)
> app-text/poppler-0.22.2 could set SLOT="0/main:35,cpp:0,glib:8:qt4:4".

It should be: SLOT="0/main:35,cpp:0,glib:8,qt4:4"
Comment 2 Ciaran McCreesh 2013-03-18 11:09:57 UTC
The goal of subslots is to force a rebuild when one's necessary, not to prevent rebuilds when they're not... This is far too complicated for far too little gain.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-03-18 11:14:30 UTC
A similar situation is with xorg-server, which has 3 important ABIs (VIDEODRV, XINPUT, EXTENSION). Currently, the depending packages are rebuilt more often than strictly necessary.
Comment 4 Andreas K. Hüttel gentoo-dev 2013-03-18 16:49:57 UTC
The idea makes sense. 

That said, this increases the burden on maintainers. If we decide to provide this functionality, it should be an offer to library maintainers, not a requirement.
Comment 5 David Leverton 2013-03-23 19:36:28 UTC
(In reply to comment #0)
> app-text/poppler-0.22.2 could set SLOT="0/main:35,cpp:0,glib:8:qt4:4".

Is it too late to rethink jamming this stuff into SLOT, and if so can we at least have some whitespace?
Comment 6 Zac Medico gentoo-dev 2013-03-28 15:24:54 UTC
A possible alternative, which came up in bug 462020, is to use to create a separate virtual for each soname. The subslot of the virtual would then be bumped only when its associated soname changes. The virtual would depend on a range of versions that provide the associated soname. For example:

  || ( app-text/poppler:0/37 app-text/poppler:0/36 app-text/poppler:0/35 )
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2013-07-11 13:54:07 UTC
(In reply to Zac Medico from comment #6)
> A possible alternative, which came up in bug 462020, is to use to create a
> separate virtual for each soname. The subslot of the virtual would then be
> bumped only when its associated soname changes. The virtual would depend on
> a range of versions that provide the associated soname. For example:
> 
>   || ( app-text/poppler:0/37 app-text/poppler:0/36 app-text/poppler:0/35 )

This route may make more sense, when only a particular lib is being used out of a package rather than the whole package -- among other things, this would allow the lib to be repackaged later without *DEPEND in comsumers needing to change.

However, I tried implementing this with xorg-server and the three primary A{P,B}Is it provides (to coincide with xorg-drivers) -- there is a LOT of addtional work to deal with, to keep the virtuals in sync with the parent package, especially when you have to deal with stable vs ~arch vs multiple versions at the same keyword level.  I ended up scripting something to recreate all the virtuals whenever xorg-server's ebuilds were bumped.  So if this solution were to become common, we would probably want to build a tool as well as (repoman?) checks to help devs with keeping the virtuals in sync.  

(*OR*, we could always bring back the PROVIDES= syntax :P )
Comment 8 Ulrich Müller gentoo-dev 2014-01-14 14:08:48 UTC
(In reply to Ciaran McCreesh from comment #2)
> The goal of subslots is to force a rebuild when one's necessary, not to
> prevent rebuilds when they're not... This is far too complicated for far too
> little gain.

+1

If rebuilds are to be avoided, splitting the packages that are affected by this makes more sense than further complicating dependency specification.

Alternatively, virtuals can be used, as suggested in comment #6.
Comment 9 Andreas K. Hüttel gentoo-dev 2014-01-14 14:24:09 UTC
(In reply to Ulrich Müller from comment #8)
> (In reply to Ciaran McCreesh from comment #2)
> > The goal of subslots is to force a rebuild when one's necessary, not to
> > prevent rebuilds when they're not... This is far too complicated for far too
> > little gain.
> 
> +1
> 

While I like this approach in principle, this works only if we can make it into an official QA policy. Otherwise the, err, rather forceful opposition of several devs will prevent the adoption of subslots at all. For an example, see bug 490362.

> Alternatively, virtuals can be used, as suggested in comment #6.

That's way more complex.
Comment 10 Samuli Suominen gentoo-dev 2014-02-18 08:14:36 UTC
*** Bug 501656 has been marked as a duplicate of this bug. ***
Comment 11 Samuli Suominen gentoo-dev 2014-02-18 08:16:28 UTC
> Samuli Suominen 2014-02-18 10:14:36 EET Comment 10
> Duplicate of this bug: 501656

media-gfx/imagemagick has different subslot for every release because after every release, dev-ruby/rmagick needs to be rebuilt

but now I have no way of handling the SONAME changes so other packages could use := too, now only rmagick can have := in imagemagick dep
Comment 12 Samuli Suominen gentoo-dev 2014-02-18 08:36:24 UTC
(In reply to Samuli Suominen from comment #11)
> > Samuli Suominen 2014-02-18 10:14:36 EET Comment 10
> > Duplicate of this bug: 501656
> 
> media-gfx/imagemagick has different subslot for every release because after
> every release, dev-ruby/rmagick needs to be rebuilt
> 
> but now I have no way of handling the SONAME changes so other packages could
> use := too, now only rmagick can have := in imagemagick dep

and splitting is not an option here, it doesn't help at all.