* [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
@ 2019-12-19 19:40 Michał Górny
2019-12-20 16:19 ` Mike Gilbert
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Michał Górny @ 2019-12-19 19:40 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]
Hello,
Here's another potential EAPI 8 feature I'd like to discuss. Please
note that this is about *new dependency type*, so please don't hijack it
into the big 'let's steal Exherbo syntax' debate.
Bug: https://bugs.gentoo.org/660306
The problem
===========
Right now we don't really have a clean way of specifying dependencies
that are used during pkg_*inst (and pkg_*rm?) phases. So far RDEPEND
was used as a 'close enough' alternative (except for a few developers
who rejected it as 'invalid' and used DEPEND which is even more wrong).
However, this is no longer sufficient with EAPI 7 cross support.
By design, pkg_*inst phases are run in build host's environment when
cross is used (because obviously you can't run target host executables).
Therefore, the relevant dependencies need to be installed into CBUILD
root, while RDEPEND is installed into CHOST root.
The proposed solution
=====================
The proposal is to add a new dependency type (codename: IDEPEND) which
indicates dependencies used for pkg_*inst (and pkg_*rm?) phases. Those
dependencies would be installed into CBUILD root (like BDEPEND), and
therefore would be runnable from build host. Similarly to RDEPEND, they
would be installed for binary package installs but not for pure binpkg
builds (without install).
Example:
inherit xdg-utils
IDEPEND="dev-util/desktop-file-utils"
pkg_postinst() {
xdg_desktop_database_update
}
WDYT?
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-19 19:40 [gentoo-dev] [EAPI 8 RFC] Install-time dependencies Michał Górny
@ 2019-12-20 16:19 ` Mike Gilbert
2019-12-20 17:36 ` Alexis Ballier
2019-12-20 18:41 ` Kent Fredric
2 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2019-12-20 16:19 UTC (permalink / raw
To: Gentoo Dev
On Thu, Dec 19, 2019 at 2:40 PM Michał Górny <mgorny@gentoo.org> wrote:
>
> Hello,
>
> Here's another potential EAPI 8 feature I'd like to discuss. Please
> note that this is about *new dependency type*, so please don't hijack it
> into the big 'let's steal Exherbo syntax' debate.
>
> Bug: https://bugs.gentoo.org/660306
>
>
> The problem
> ===========
>
> Right now we don't really have a clean way of specifying dependencies
> that are used during pkg_*inst (and pkg_*rm?) phases. So far RDEPEND
> was used as a 'close enough' alternative (except for a few developers
> who rejected it as 'invalid' and used DEPEND which is even more wrong).
> However, this is no longer sufficient with EAPI 7 cross support.
>
> By design, pkg_*inst phases are run in build host's environment when
> cross is used (because obviously you can't run target host executables).
> Therefore, the relevant dependencies need to be installed into CBUILD
> root, while RDEPEND is installed into CHOST root.
>
>
> The proposed solution
> =====================
>
> The proposal is to add a new dependency type (codename: IDEPEND) which
> indicates dependencies used for pkg_*inst (and pkg_*rm?) phases. Those
> dependencies would be installed into CBUILD root (like BDEPEND), and
> therefore would be runnable from build host. Similarly to RDEPEND, they
> would be installed for binary package installs but not for pure binpkg
> builds (without install).
>
> Example:
>
> inherit xdg-utils
>
> IDEPEND="dev-util/desktop-file-utils"
>
> pkg_postinst() {
> xdg_desktop_database_update
> }
>
>
> WDYT?
Sounds good to me.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-19 19:40 [gentoo-dev] [EAPI 8 RFC] Install-time dependencies Michał Górny
2019-12-20 16:19 ` Mike Gilbert
@ 2019-12-20 17:36 ` Alexis Ballier
2019-12-20 17:55 ` Ulrich Mueller
2019-12-20 18:41 ` Kent Fredric
2 siblings, 1 reply; 9+ messages in thread
From: Alexis Ballier @ 2019-12-20 17:36 UTC (permalink / raw
To: gentoo-dev
On Thu, 2019-12-19 at 20:40 +0100, Michał Górny wrote:
> Hello,
>
> Here's another potential EAPI 8 feature I'd like to discuss. Please
> note that this is about *new dependency type*, so please don't hijack
> it
> into the big 'let's steal Exherbo syntax' debate.
>
> Bug: https://bugs.gentoo.org/660306
>
>
> The problem
> ===========
>
> Right now we don't really have a clean way of specifying dependencies
> that are used during pkg_*inst (and pkg_*rm?) phases. So far RDEPEND
> was used as a 'close enough' alternative (except for a few developers
> who rejected it as 'invalid' and used DEPEND which is even more
> wrong).
> However, this is no longer sufficient with EAPI 7 cross support.
>
> By design, pkg_*inst phases are run in build host's environment when
> cross is used (because obviously you can't run target host
> executables).
> Therefore, the relevant dependencies need to be installed into CBUILD
> root, while RDEPEND is installed into CHOST root.
>
>
> The proposed solution
> =====================
>
> The proposal is to add a new dependency type (codename: IDEPEND)
> which
> indicates dependencies used for pkg_*inst (and pkg_*rm?)
> phases. Those
> dependencies would be installed into CBUILD root (like BDEPEND), and
> therefore would be runnable from build host. Similarly to RDEPEND,
> they
> would be installed for binary package installs but not for pure
> binpkg
> builds (without install).
>
> Example:
>
> inherit xdg-utils
>
> IDEPEND="dev-util/desktop-file-utils"
>
> pkg_postinst() {
> xdg_desktop_database_update
> }
>
>
> WDYT?
>
Should we use this to drop RDEPEND from pkg_*inst/rm phases ?
PMS states "RDEPEND (unless the particular dependency results in a
circular dependency, in which case it may be installed later)" which is
kind of "maybe maybe not" and I'm not sure how one can rely on RDEPEND
for those phases in their ebuilds if another random ebuild can trigger
a case where it's not satisfied.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-20 17:36 ` Alexis Ballier
@ 2019-12-20 17:55 ` Ulrich Mueller
2019-12-20 18:02 ` Alexis Ballier
0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Mueller @ 2019-12-20 17:55 UTC (permalink / raw
To: Alexis Ballier; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
>>>>> On Fri, 20 Dec 2019, Alexis Ballier wrote:
> Should we use this to drop RDEPEND from pkg_*inst/rm phases ?
> PMS states "RDEPEND (unless the particular dependency results in a
> circular dependency, in which case it may be installed later)" which is
> kind of "maybe maybe not" and I'm not sure how one can rely on RDEPEND
> for those phases in their ebuilds if another random ebuild can trigger
> a case where it's not satisfied.
This wording has already been updated in git. It just says "RDEPEND" now
for these four phases:
https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-720008.1
Ulrich
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-20 17:55 ` Ulrich Mueller
@ 2019-12-20 18:02 ` Alexis Ballier
0 siblings, 0 replies; 9+ messages in thread
From: Alexis Ballier @ 2019-12-20 18:02 UTC (permalink / raw
To: gentoo-dev
On Fri, 2019-12-20 at 18:55 +0100, Ulrich Mueller wrote:
> > > > > > On Fri, 20 Dec 2019, Alexis Ballier wrote:
> > Should we use this to drop RDEPEND from pkg_*inst/rm phases ?
> > PMS states "RDEPEND (unless the particular dependency results in a
> > circular dependency, in which case it may be installed later)"
> > which is
> > kind of "maybe maybe not" and I'm not sure how one can rely on
> > RDEPEND
> > for those phases in their ebuilds if another random ebuild can
> > trigger
> > a case where it's not satisfied.
>
> This wording has already been updated in git. It just says "RDEPEND"
> now
> for these four phases:
>
> https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-720008.1
>
>
Ok.
My question still stands though, so that we can avoid mutual RDEPEND
cycles and also, as you noted on the bug, in a x-compile setting, CHOST
deps are not really needed at installation.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-19 19:40 [gentoo-dev] [EAPI 8 RFC] Install-time dependencies Michał Górny
2019-12-20 16:19 ` Mike Gilbert
2019-12-20 17:36 ` Alexis Ballier
@ 2019-12-20 18:41 ` Kent Fredric
2019-12-20 18:54 ` Mike Gilbert
2 siblings, 1 reply; 9+ messages in thread
From: Kent Fredric @ 2019-12-20 18:41 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
On Thu, 19 Dec 2019 20:40:26 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> The proposal is to add a new dependency type (codename: IDEPEND) which
> indicates dependencies used for pkg_*inst (and pkg_*rm?) phases
Given the nature of this, I somewhat expect this to cover dependencies
required for src_unpack and src_fetch, and possibly src_prepare
Am I misunderstanding?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-20 18:41 ` Kent Fredric
@ 2019-12-20 18:54 ` Mike Gilbert
2019-12-20 19:21 ` Kent Fredric
0 siblings, 1 reply; 9+ messages in thread
From: Mike Gilbert @ 2019-12-20 18:54 UTC (permalink / raw
To: Gentoo Dev
On Fri, Dec 20, 2019 at 1:41 PM Kent Fredric <kentnl@gentoo.org> wrote:
>
> On Thu, 19 Dec 2019 20:40:26 +0100
> Michał Górny <mgorny@gentoo.org> wrote:
>
> > The proposal is to add a new dependency type (codename: IDEPEND) which
> > indicates dependencies used for pkg_*inst (and pkg_*rm?) phases
>
> Given the nature of this, I somewhat expect this to cover dependencies
> required for src_unpack and src_fetch, and possibly src_prepare
>
> Am I misunderstanding?
Yes, I think you misunderstand something, but I'm not sure exactly how.
Tools used during src_unpack and src_prepare are generally covered by BDEPEND.
src_fetch isn't formally defined yet, but probably needs its own
dependency class if BDEPEND wont cover it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-20 18:54 ` Mike Gilbert
@ 2019-12-20 19:21 ` Kent Fredric
2019-12-20 19:33 ` Michał Górny
0 siblings, 1 reply; 9+ messages in thread
From: Kent Fredric @ 2019-12-20 19:21 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
On Fri, 20 Dec 2019 13:54:44 -0500
Mike Gilbert <floppym@gentoo.org> wrote:
> Yes, I think you misunderstand something, but I'm not sure exactly how.
I think the missing part of my understanding might be that IDEPEND
needs to be satisfied by:
- Packages installing binpkg's ( which don't need src_fetch, unpack, etc )
- Package managers *removing* packages.
As in, if a package declares IDEPEND="foo"
And "foo" is not available when asking portage to "emerge -C bar"
Portage must demand that "foo" is reinstalled to allow "bar" to be
removed ( as foo needs to be there to complete pkg_*rm )
This probably gonna make package manager fun :)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] [EAPI 8 RFC] Install-time dependencies
2019-12-20 19:21 ` Kent Fredric
@ 2019-12-20 19:33 ` Michał Górny
0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2019-12-20 19:33 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 975 bytes --]
On Sat, 2019-12-21 at 08:21 +1300, Kent Fredric wrote:
> On Fri, 20 Dec 2019 13:54:44 -0500
> Mike Gilbert <floppym@gentoo.org> wrote:
>
> > Yes, I think you misunderstand something, but I'm not sure exactly how.
>
> I think the missing part of my understanding might be that IDEPEND
> needs to be satisfied by:
>
> - Packages installing binpkg's ( which don't need src_fetch, unpack, etc )
> - Package managers *removing* packages.
>
> As in, if a package declares IDEPEND="foo"
>
> And "foo" is not available when asking portage to "emerge -C bar"
>
> Portage must demand that "foo" is reinstalled to allow "bar" to be
> removed ( as foo needs to be there to complete pkg_*rm )
>
> This probably gonna make package manager fun :)
Hence, ebuilds will need to account for the dependencies actually being
missing in pkg_*rm. And the package managers must not implement
proactive depcleaning of IDEPEND.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-12-20 19:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 19:40 [gentoo-dev] [EAPI 8 RFC] Install-time dependencies Michał Górny
2019-12-20 16:19 ` Mike Gilbert
2019-12-20 17:36 ` Alexis Ballier
2019-12-20 17:55 ` Ulrich Mueller
2019-12-20 18:02 ` Alexis Ballier
2019-12-20 18:41 ` Kent Fredric
2019-12-20 18:54 ` Mike Gilbert
2019-12-20 19:21 ` Kent Fredric
2019-12-20 19:33 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox