Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 944973 - mail-client/alpine-2.26-r5 fails to compile: patch -p1 failed with 0023-Fix-for-a-better-bound-check-in-imap-src-c-client-nn.patch
Summary: mail-client/alpine-2.26-r5 fails to compile: patch -p1 failed with 0023-Fix-f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-11-26 07:46 UTC by Agostino Sarubbo
Modified: 2024-11-26 11:34 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,53.69 KB, text/plain)
2024-11-26 07:46 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-11-26 07:46:27 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: mail-client/alpine-2.26-r5 fails to compile.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-11-26 07:46:28 UTC
Created attachment 911924 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-11-26 07:46:28 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


1 out of 1 hunk FAILED -- saving rejects to file pith/pine.hlp.rej
 *             environment, line  967:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/mail-client/alpine-2.26-r5/work/alpine-2.26-patches/0023-Fix-for-a-better-bound-check-in-imap-src-c-client-nn.patch'
Hunk #1 FAILED at 147.
 *   patch -p1  failed with /var/tmp/portage/mail-client/alpine-2.26-r5/work/alpine-2.26-patches/0023-Fix-for-a-better-bound-check-in-imap-src-c-client-nn.patch
Comment 3 Holger Hoffstätte 2024-11-26 10:30:10 UTC
Why are the patches applied in the wrong order? Of course this won't work.
Comment 4 Holger Hoffstätte 2024-11-26 10:38:28 UTC
(In reply to Holger Hoffstätte from comment #3)
> Why are the patches applied in the wrong order? Of course this won't work.

Because find I only ever used tmpfs which observes insertion order :(
Just adding a sort after the find should do it.
Comment 5 Ulrich Müller gentoo-dev 2024-11-26 10:51:37 UTC
Why don't you just
	eapply "${WORKDIR}"/${P}-patches/0*.patch
without the find and the loop? eapply can accept multiple arguments.
Comment 6 Holger Hoffstätte 2024-11-26 11:12:33 UTC
I reproduced the problem by using PORTAGE_TMPFS on a machine with ext4. The PR fixes it by explicitly sorting the list.
Comment 7 Holger Hoffstätte 2024-11-26 11:13:12 UTC
(In reply to Ulrich Müller from comment #5)
> Why don't you just
> 	eapply "${WORKDIR}"/${P}-patches/0*.patch
> without the find and the loop? eapply can accept multiple arguments.

Didn't know that :-(
Comment 8 Larry the Git Cow gentoo-dev 2024-11-26 11:34:19 UTC
The bug has been closed via the following commit(s):

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

commit 946770868f05d7340adad87bde656ec5b70644b3
Author:     Holger Hoffstätte <holger@applied-asynchrony.com>
AuthorDate: 2024-11-26 11:02:49 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2024-11-26 11:31:57 +0000

    mail-client/alpine: list of patches must be sorted
    
    Use eapply instead of find, which will implicitly sort the list
    of patches. This also simplifies the entire procedure.
    
    Closes: https://bugs.gentoo.org/944973
    Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 mail-client/alpine/alpine-2.26-r5.ebuild | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)