Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886123 - Bootstrapping Gentoo Prefix fails for bison-3.8.2-r2
Summary: Bootstrapping Gentoo Prefix fails for bison-3.8.2-r2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: Other Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-15 10:40 UTC by thomas.roblitz
Modified: 2023-04-23 19:16 UTC (History)
1 user (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 thomas.roblitz 2022-12-15 10:40:30 UTC
Hi,

tried to bootstrap the Gentoo Prefix using Gentoo commit dc2122624ddc25b65d65051eb4c27b55b3d1ad07 (Dec 14, 2022). Bootstrapping fails during stage 2 for package bison-3.8.2-r2 with the error message

ln: failed to create symbolic link '/cvmfs/pilot.eessi-hpc.org/versions/2022.11/compat/linux/aarch64/tmp/usr/bin/yacc': File exists
 * ERROR: sys-devel/bison-3.8.2-r2::gentoo failed (postinst phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 127:  Called pkg_postinst
 *   environment, line 1602:  Called die
 * The specific snippet of code:
 *           ln -s yacc.bison "${EROOT}/usr/bin/yacc" || die;

In early November 2022 bootstrapping worked (Gentoo commit cec3214ef5d5661e28c9d2c5b5750b27c27c5435, Nov 3, 2022). Version of bison then was 3.8.2.

Let me know if you need more information.

Best regards

Thomas
Comment 1 APN-Pucky 2023-01-11 13:09:53 UTC
Hi,

I experienced the same error today (Jan 11, 2023).

Since it is a file collision I guess it is related to this news item: 

https://github.com/gentoo/gentoo-news/blob/master/2022-12-27-alternatives-introduction/2022-12-27-alternatives-introduction.en.txt

where also app-alternatives/yacc was introduced.
From the news it seems like the collision could be ignored, but the bootstrap still fails.

Cheers
APN
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-13 09:49:26 UTC
It's got to be because it exists but isn't a symlink:
        -h FILE
               FILE exists and is a symbolic link (same as -L)
Comment 3 Larry the Git Cow gentoo-dev 2023-01-13 10:01:17 UTC
The bug has been closed via the following commit(s):

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

commit aa1d9b702b2f2ae20082028c5ee9436a40879755
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-13 09:49:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-13 10:01:11 +0000

    sys-devel/bison: adapt pkg_postinst for prefix bootstrapping
    
    The file may exist as it was manually built and it's okay to just ignore
    it for now as it'll get washed out during stage3.
    
    Closes: https://bugs.gentoo.org/886123
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/bison/bison-3.8.2-r2.ebuild | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
Comment 4 Larry the Git Cow gentoo-dev 2023-04-23 19:16:54 UTC
The bug has been referenced in the following commit(s):

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

commit ef1e3dad5e18f887a56ae06c02eff74ab5c33a40
Author:     Yifeng Li <tomli@tomli.me>
AuthorDate: 2023-04-23 16:43:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-23 19:12:59 +0000

    app-arch/tar: adapt pkg_postinst for prefix bootstrapping
    
    This commit allows Portage to overwrite the binary executable
    "tar" with a symbolic link, this situation is encountered during
    Gentoo prefix bootstrap. If left unhandled, it causes the bootstrap
    to fail with the error message:
    
        ln: failed to create symbolic link '/Users/ec2-user/gentoo/tmp/bin/tar': File exists
    
    The original binary is renamed to tar.bak.
    
    [sam: This is analogous to sys-devel/bison's hack too.]
    
    Bug: https://bugs.gentoo.org/886123
    Closes: https://bugs.gentoo.org/904887
    Suggested-by: Sam James <sam@gentoo.org>
    Signed-off-by: Yifeng Li <tomli@tomli.me>
    Closes: https://github.com/gentoo/gentoo/pull/30723
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/tar/tar-1.34-r2.ebuild | 7 +++++++
 app-arch/tar/tar-1.34-r3.ebuild | 7 +++++++
 2 files changed, 14 insertions(+)