Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 780585 - java-pkg-2.eclass: java-pkg-2_src_prepare does not apply patches which ends up in a awkward code
Summary: java-pkg-2.eclass: java-pkg-2_src_prepare does not apply patches which ends u...
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest
: 728814 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-06 13:17 UTC by Miroslav Šulc
Modified: 2024-01-20 18:21 UTC (History)
4 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 Miroslav Šulc gentoo-dev 2021-04-06 13:17:24 UTC
see for example this: https://github.com/gentoo/gentoo/pull/20222#pullrequestreview-628652522

if the eclass would be changed to apply patches then all related packages must be updated so they don't apply the patches twice as that would cause failure in the prepare phase.
Comment 1 Volkmar W. Pogatzki 2023-01-16 19:27:22 UTC
*** Bug 728814 has been marked as a duplicate of this bug. ***
Comment 2 Larry the Git Cow gentoo-dev 2023-02-17 13:48:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e6ef25805e608c9eaeb44e7ba7bdd13dfcee65b

commit 2e6ef25805e608c9eaeb44e7ba7bdd13dfcee65b
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2023-02-17 08:52:52 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2023-02-17 13:47:50 +0000

    java-utils-2.eclass: default to default_src_prepare for future EAPI
    
    Presently patches from a PATCHES array are not getting applied unless
    "default" or "eapply_user" is set in the ebuild. In cases where nothing
    else needs to be prepared it still needs src_prepare in the ebuild
    
    src_prepare() {
            default
    }
    
    With this change, starting from EAPI 9 this will no longer be needed. In
    cases where any other changes are done in the prepare phase it would only
    need java-pkg-2_src_prepare be added:
    
    src_prepare() {
            java-pkg-2_src_prepare
            cp, rm, mv, sed or other changes
    }
    
    Bug: https://bugs.gentoo.org/780585
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 eclass/java-utils-2.eclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 4 Larry the Git Cow gentoo-dev 2024-01-20 10:09:09 UTC
The bug has been referenced in the following commit(s):

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

commit f007377cffdcdc04c349494481be5dc01ce313f9
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2023-02-17 08:52:52 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2024-01-20 10:08:07 +0000

    java-utils-2.eclass: default to default_src_prepare for future EAPI
    
    Presently patches from a PATCHES array are not getting applied unless
    "default" or "eapply_user" is set in the ebuild. In cases where nothing
    else needs to be prepared it still needs src_prepare in the ebuild
    
    src_prepare() {
            default
    }
    
    With this change, starting from EAPI 9 this will no longer be needed. In
    cases where any other changes are done in the prepare phase it would only
    need java-pkg-2_src_prepare be added:
    
    src_prepare() {
            java-pkg-2_src_prepare
            cp, rm, mv, sed or other changes
    }
    
    Bug: https://bugs.gentoo.org/780585
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/34897
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 eclass/java-utils-2.eclass | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)