Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914261 - bootstrap-prefix.sh keeps executing itself
Summary: bootstrap-prefix.sh keeps executing itself
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-16 06:47 UTC by Leonardo Hernández Hernández
Modified: 2023-09-16 13:38 UTC (History)
0 users

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


Attachments
the script output (bootstrap-prefix-output.txt,93.93 KB, text/plain)
2023-09-16 06:50 UTC, Leonardo Hernández Hernández
Details
output of 'ps faux' (ps-faux.txt,34.95 KB, text/plain)
2023-09-16 06:52 UTC, Leonardo Hernández Hernández
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Hernández Hernández 2023-09-16 06:47:28 UTC
When I tried to create a prefix the script just keeps executing itself

Reproducible: Always

Steps to Reproduce:
1. Download the script (reproduced in commit ac4c67f00fd053c8556580d3101066c99b6d1051) and make it executable
2. Run the script using the defaults, but using the shortcut
Actual Results:  
I't just keeps executing itself

Expected Results:  
I should've create a prefix
Comment 1 Leonardo Hernández Hernández 2023-09-16 06:50:07 UTC
Created attachment 870673 [details]
the script output
Comment 2 Leonardo Hernández Hernández 2023-09-16 06:52:24 UTC
Created attachment 870674 [details]
output of 'ps faux'
Comment 3 Fabian Groffen gentoo-dev 2023-09-16 13:01:49 UTC
what is "the shortcut" in this case?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-16 13:04:12 UTC
(In reply to Fabian Groffen from comment #3)
> what is "the shortcut" in this case?

>  Do you want me to take the shortcut? [yN] Good!
Comment 5 Fabian Groffen gentoo-dev 2023-09-16 13:06:02 UTC
Ok, so that should be No.  But I doubt it has anything to do with this.  Thanks.
Comment 6 Fabian Groffen gentoo-dev 2023-09-16 13:20:23 UTC
this looks like a PARTIAL_BOOTSTRAP loop to me, because there's quite a typo/thinko in the block that tries to do the interactive part for each stage...
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-16 13:20:33 UTC
On IRC, they indicated they'd said yes, but maybe I misunderstood.

But AFAICT, it's the only way you'd get stage_host_gentoo set (per ps faux)?
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-16 13:20:45 UTC
oops, collided.. (hadn't seen your comment)
Comment 9 Larry the Git Cow gentoo-dev 2023-09-16 13:38:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=d2ade9a39e38c2e62117794b46b90a7c14237ce1

commit d2ade9a39e38c2e62117794b46b90a7c14237ce1
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2023-09-16 13:35:35 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2023-09-16 13:35:35 +0000

    scripts/bootstrap-prefix: fix endless loop with Gentoo bootstrap
    
    When we try to use turbo-boost bootstrap, we end up in an endless loop.
    Reason is the code that was added to ensure individual stage calls would
    have a properly inited environment.  However that contained not just a
    bug, but also would cause stage_host_gentoo to be called over and over
    again.
    
    Now just exit from bootstrap_interactive once we set all the vars we
    need.  Ensure we don't run any bootstrapping code before that point.
    
    Thanks Leonardo Hernández Hernández for pointing this out.
    
    Closes: https://bugs.gentoo.org/914261
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 scripts/bootstrap-prefix.sh | 68 +++++++++++++++++++--------------------------
 1 file changed, 29 insertions(+), 39 deletions(-)