Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 920654

Summary: sandbox functions: die message encourages colon-separated paths
Product: Portage Development Reporter: Ulrich Müller <ulm>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/portage/pull/1213
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 919862    
Bug Blocks: 563798    

Description Ulrich Müller gentoo-dev 2023-12-24 10:49:50 UTC
According to PMS [1] and the Devmanual [2], only a single item is allowed as argument for addread, addwrite, adddeny and addpredict.

However, the "die" message of these functions says (e.g. for addpredict):
   addpredict <colon-delimited list of paths>
and indeed they accept such a colon-separated list of paths.

[1] https://projects.gentoo.org/pms/8/pms.html#x1-12300012.3.3
[2] https://devmanual.gentoo.org/function-reference/sandbox-functions/
Comment 1 Larry the Git Cow gentoo-dev 2023-12-27 21:18:28 UTC
The bug has been referenced in the following commit(s):

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

commit cb788dd9acf9f48a9c4934920ebadaa942fe0682
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-12-24 10:54:27 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-12-27 15:09:32 +0000

    ebuild.sh: Warn about colon-separated argument in sandbox functions
    
    According to PMS and the Devmanual, only a single item is allowed
    as argument for addread, addwrite, adddeny and addpredict:
    https://projects.gentoo.org/pms/8/pms.html#x1-12300012.3.3
    https://devmanual.gentoo.org/function-reference/sandbox-functions/
    
    The previous usage message (contrary to Devmanual policy) had been
    added in commit 0c6454261c514f021a4ddce2415a68773027ed6a.
    
    Bug: https://bugs.gentoo.org/920654
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 NEWS          | 4 ++++
 bin/ebuild.sh | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2023-12-27 21:28:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a1f19cdd7a598070b7eb08b3954e677aa4868ad

commit 0a1f19cdd7a598070b7eb08b3954e677aa4868ad
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-27 21:27:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-27 21:28:01 +0000

    sys-apps/portage: add 3.0.59
    
    Closes: https://bugs.gentoo.org/587088
    Closes: https://bugs.gentoo.org/822033
    Closes: https://bugs.gentoo.org/915494
    Closes: https://bugs.gentoo.org/916135
    Closes: https://bugs.gentoo.org/917120
    Closes: https://bugs.gentoo.org/919862
    Closes: https://bugs.gentoo.org/920095
    Closes: https://bugs.gentoo.org/920258
    Closes: https://bugs.gentoo.org/920537
    Closes: https://bugs.gentoo.org/920654
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.59.ebuild | 246 +++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+)