Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605880 - sys-libs/db: rethinking the current slotting model (see comment #11 about how to properly RDEPEND on db)
Summary: sys-libs/db: rethinking the current slotting model (see comment #11 about how...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-16 12:11 UTC by Pacho Ramos
Modified: 2017-07-03 08:01 UTC (History)
1 user (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 Pacho Ramos gentoo-dev 2017-01-16 12:11:50 UTC
Hello

Currently we are having one slot per major version, even if all deps are ported sooner or later, (as it happens with many other libs that are not slotted in the tree in this way).

The main issue of current mode is that most reverse deps are needing to RDEPEND on db:* as most of them are compatible with all the versions in the tree. This prevents us from using subslot rebuilds that are needed as we cannot RDEPEND on := db at the same time. I am also unsure if all reverse deps are really linking to always the latest db version or a random one depending on the slot we had installed at the time the package was built (this reminds me a past problem we had with gmime package, as some dependencies were being hiddenly linked to old slot even if compatible with both instead of taking the last one).

Personally I think that this slotting is not really so useful, specially taking care about that downsides. 

Currently, most packages will work with latest version 5, regarding version 6, there are not so much broken and all of them need to be ported instead of they trying to use an old slot to hide that lack of porting.

What do you think?
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2017-01-16 12:26:32 UTC
I am using db-6* on most of my systems and I can tell you that there still are packages not building with db-6.2 for example.

There are even packages that refuse to build against db-6* due to its stupid AGPL-3 license. 
So we either abandon db-6 entirely or (what I would prefer) keep the slotting approach.
Comment 2 Alexis Ballier gentoo-dev 2017-01-16 12:39:48 UTC
(In reply to Pacho Ramos from comment #0)
> The main issue of current mode is that most reverse deps are needing to
> RDEPEND on db:* as most of them are compatible with all the versions in the
> tree. This prevents us from using subslot rebuilds that are needed as we
> cannot RDEPEND on := db at the same time.


I think you can := just fine as subslot == slot if not set


(In reply to Lars Wendler (Polynomial-C) from comment #1)
> There are even packages that refuse to build against db-6* due to its stupid
> AGPL-3 license. 
> So we either abandon db-6 entirely or (what I would prefer) keep the
> slotting approach.

Maybe 2 slots would suffice for this ? One for the old license, one for the AGPL one.
Comment 3 Pacho Ramos gentoo-dev 2017-01-16 21:16:39 UTC
(In reply to Alexis Ballier from comment #2)
> (In reply to Pacho Ramos from comment #0)
> > The main issue of current mode is that most reverse deps are needing to
> > RDEPEND on db:* as most of them are compatible with all the versions in the
> > tree. This prevents us from using subslot rebuilds that are needed as we
> > cannot RDEPEND on := db at the same time.
> 
> 
> I think you can := just fine as subslot == slot if not set

I don't think so... where is that information? :/ How can you allow multiple slots to comply that dep and also respect := slot?
Comment 4 Alexis Ballier gentoo-dev 2017-01-16 22:16:57 UTC
(In reply to Pacho Ramos from comment #3)
> (In reply to Alexis Ballier from comment #2)
> > (In reply to Pacho Ramos from comment #0)
> > > The main issue of current mode is that most reverse deps are needing to
> > > RDEPEND on db:* as most of them are compatible with all the versions in the
> > > tree. This prevents us from using subslot rebuilds that are needed as we
> > > cannot RDEPEND on := db at the same time.
> > 
> > 
> > I think you can := just fine as subslot == slot if not set
> 
> I don't think so... where is that information? :/


https://projects.gentoo.org/pms/5/pms.html#x1-660007.2

When the sub-slot part is omitted from the SLOT definition, the package is considered to have an implicit sub-slot which is equal to the regular slot.

> How can you allow multiple
> slots to comply that dep and also respect := slot?

:= means ~ 'rebuild if slot changes' where slot is the SLOT variable, aka "${slot}:${subslot}" (probably what is causing confusion), so upgrading from a package with SLOT=5.1 to SLOT=5.2 causes a rebuild too (or, at least, causes  not to depclean SLOT=5.1 until everything has been rebuilt for SLOT=5.2)

As for multiple slots, pms defines := to consider it has been built against 'best_version ${dep_atom}', so if you have SLOT=5.1 and SLOT=5.2 installed, package manager will consider a package with a := dep will be built against SLOT=5.2; even if it is not true for some other reason (like SLOT=5.1 has been eselected), this becomes a package bug / automagic in that case
Comment 5 Pacho Ramos gentoo-dev 2017-01-16 22:23:43 UTC
I will CC pms team to clarify... I think that rebuilding are not working... and, if I don't misremember, people trying to use something like || ( db:6.2= db:5.0= ... ) is not allowed
Comment 6 Lars Wendler (Polynomial-C) gentoo-dev 2017-01-16 22:46:15 UTC
(In reply to Pacho Ramos from comment #5)
> and, if I don't misremember, people trying to use something like || (
> db:6.2= db:5.0= ... ) is not allowed

That is correct. You'd have to do something like this:

RDEPEND="
|| (
    sys-libs/db:6.2
    sys-libs/db:6.1
    sys-libs/db:5.3
    sys-libs/db:4.8
)
sys-libs/db:=
"
Comment 7 Alexis Ballier gentoo-dev 2017-01-16 22:49:15 UTC
(In reply to Pacho Ramos from comment #5)
> I will CC pms team to clarify... I think that rebuilding are not working...
> and, if I don't misremember, people trying to use something like || (
> db:6.2= db:5.0= ... ) is not allowed


Well, || ( a:= b:= ) with non-exclusive a and b is indeed unlikely to work properly.

What should work in that case is:

sys-libs/db:=
|| ( sys-libs/db:6.2 sys-libs/db:5.0 )
Comment 8 Alexis Ballier gentoo-dev 2017-01-16 22:53:52 UTC
(In reply to Alexis Ballier from comment #7)
(In reply to Lars Wendler (Polynomial-C) from comment #6)

Bah, comment collision :)



As a side note: "sys-libs/db:= || ( sys-libs/db:5 sys-libs/db:6 )"
with 'best_version sys-libs/db' being sys-libs/db:7 will make PM store sys-libs/db:7= in vdb, thus would not work perfectly either and could explain why your rebuilds are not working.
Comment 9 Pacho Ramos gentoo-dev 2017-01-16 23:08:59 UTC
In that case we need to document it in some place and try to give that syntax more notice as I think nobody knows about that, I think no reverse dep is using that... and probably most of them would need it :/
Comment 10 Pacho Ramos gentoo-dev 2017-01-16 23:10:45 UTC
And also note that probably people will need to about db:* deps as I think most of the people are using it as "this will work with all slots" without taking care they are skipping the subslot rebuilding with that
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-16 23:18:55 UTC
|| (
    sys-libs/db:6.2
    sys-libs/db:6.1
    sys-libs/db:5.3
    sys-libs/db:4.8
)
<sys-libs/db-6.3:=


...and I'm pretty sure I've already used that example somewhere. The || guarantees that at least one of the listed versions is installed, and := binds to the highest version matching the specification, i.e. <6.3 in this case. Since the former, you don't need to worry about lower bound.