Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911574 - Make BROOT available in more pkg_ phases
Summary: Make BROOT available in more pkg_ phases
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords: InVCS
Depends on: 908971
Blocks:
  Show dependency tree
 
Reported: 2023-08-01 20:14 UTC by Mike Gilbert
Modified: 2023-08-09 17:24 UTC (History)
3 users (show)

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


Attachments
ebuild-env-vars.tex: BROOT is valid in additional pkg_* phases (0001-ebuild-env-vars.tex-BROOT-is-valid-in-additional-pkg.patch,1.91 KB, patch)
2023-08-02 10:25 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2023-08-01 20:14:06 UTC
PMS currently limits BROOT to pkg_setup and src_*.

It is conceivable that we would want to call in binary installed in BROOT via a dependency in IDEPEND from pkg_preinst, pkg_postinst, pkg_prerm, or pkg_postrm.

For example, say a package installs some kind of cache updater outside of PATH in /usr/libexec. We might want to do make a call like this in pkg_postinst:

"${BROOT}"/usr/libexec/update-foo-cache --cache-file="${EROOT}"/var/cache/foo.cache
Comment 1 Ulrich Müller gentoo-dev 2023-08-02 10:25:51 UTC
Created attachment 866838 [details, diff]
ebuild-env-vars.tex: BROOT is valid in additional pkg_*  phases
Comment 2 Larry the Git Cow gentoo-dev 2023-08-03 16:20:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=1a27729740e17ccd4b7a4527a46011fa62c9efb1

commit 1a27729740e17ccd4b7a4527a46011fa62c9efb1
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-02 10:18:54 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-03 16:17:47 +0000

    ebuild-env-vars.tex: BROOT is valid in additional pkg_* phases
    
    By section sec:dependency-classes, dependency class BDEPEND is
    satisfied in phase functions src_* and pkg_setup (only if part of
    source build); IDEPEND is satisfied in pkg_preinst, pkg_postinst,
    pkg_prerm and pkg_postrm.
    
    Update the entry for BROOT accordingly.
    
    Closes: https://bugs.gentoo.org/911574
    Reported-by: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ebuild-env-vars.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 3 Larry the Git Cow gentoo-dev 2023-08-06 15:26:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=5c394f7d83e432cde0d9ff9d70c2e2eb0c1c2327

commit 5c394f7d83e432cde0d9ff9d70c2e2eb0c1c2327
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-02 10:18:54 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-06 11:09:41 +0000

    ebuild-env-vars.tex: BROOT is valid in additional pkg_* phases
    
    By section sec:dependency-classes, dependency class BDEPEND is
    satisfied in phase functions src_* and pkg_setup (only if part of
    source build); IDEPEND is satisfied in pkg_preinst, pkg_postinst,
    pkg_prerm and pkg_postrm.
    
    Update the entry for BROOT accordingly.
    
    Closes: https://bugs.gentoo.org/911574
    Reported-by: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ebuild-env-vars.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 Larry the Git Cow gentoo-dev 2023-08-06 22:28:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=cfa3149797c2204f3a156ec2909c444baa640a6b

commit cfa3149797c2204f3a156ec2909c444baa640a6b
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2023-08-06 09:40:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-06 22:28:50 +0000

    Define BROOT in pkg_* phases following PMS change
    
    Closes: https://bugs.gentoo.org/911797
    Bug: https://bugs.gentoo.org/911574
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    Closes: https://github.com/gentoo/portage/pull/1077
    Signed-off-by: Sam James <sam@gentoo.org>

 NEWS                                 | 3 +++
 bin/phase-helpers.sh                 | 4 ++--
 lib/portage/package/ebuild/config.py | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2023-08-09 02:57:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=858dfd771ac4c6c9315ac5851f4aeeb233fc21d5

commit 858dfd771ac4c6c9315ac5851f4aeeb233fc21d5
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-09 02:54:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-09 02:54:12 +0000

    sys-apps/portage: add 3.0.50
    
    Closes: https://bugs.gentoo.org/908971
    Closes: https://bugs.gentoo.org/640658
    Closes: https://bugs.gentoo.org/894398
    Closes: https://bugs.gentoo.org/895908
    Closes: https://bugs.gentoo.org/909067
    Closes: https://bugs.gentoo.org/909148
    Closes: https://bugs.gentoo.org/909853
    Closes: https://bugs.gentoo.org/910035
    Closes: https://bugs.gentoo.org/910376
    Closes: https://bugs.gentoo.org/911594
    Closes: https://bugs.gentoo.org/911574
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.50.ebuild | 229 +++++++++++++++++++++++++++++++++
 2 files changed, 230 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2023-08-09 17:24:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=ea32ea927dad915bd50e0dcf976379b8470eb4d7

commit ea32ea927dad915bd50e0dcf976379b8470eb4d7
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-06 09:52:14 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-07 17:08:16 +0000

    ebuild-env-vars.tex: Add footnote about BROOT in pkg_* phases
    
    Restrict the previous change to EAPIs that actually support IDEPEND.
    
    Bug: https://bugs.gentoo.org/911574
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ebuild-env-vars.tex | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)