Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for overriding profile #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lu-zero
Copy link
Member

@lu-zero lu-zero commented Jun 26, 2024

If the profile is merge-usr things will fail later because crossdev baselayout is different.

Copy link
Member

@chewi chewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the S-o-b footer in the commit.

Thanks, this is a nice addition. I've thought for a while that crossdev should try to pick a good default profile as embedded is almost never what you want, but this is still useful regardless.

@@ -107,6 +106,8 @@ cross_wrap_etc()
EOF
fi

PORTAGE_CONFIGROOT=${SYSROOT} eselect profile set --force ${PROFILE}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest setting ROOT=/usr/${CHOST} and EPREFIX= instead, but looking at how profile.eselect works, I think what you have is correct because the repos are not configured under /usr/${CHOST}/etc/portage.

It's slightly brittle in that it relies on profile.eselect calling portageq get_repo_path "${EROOT:-/}" and portageq get_repo_path (thankfully) ignoring PORTAGE_CONFIGROOT, but that's what we have to work with.

But it is probably best to quote PROFILE here.

Suggested change
PORTAGE_CONFIGROOT=${SYSROOT} eselect profile set --force ${PROFILE}
PORTAGE_CONFIGROOT=${SYSROOT} eselect profile set --force "${PROFILE}"

@@ -1557,7 +1559,7 @@ hr
### Create links for helper scripts ###

xmkdir -p "${EPREFIX}"/usr/${CTARGET}
LLVM="${LLVM}" emerge-wrapper --target ${CTARGET} --init || exit 1
LLVM="${LLVM}" emerge-wrapper --target ${CTARGET} --init --profile ${PROFILE} || exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also quote here, include CTARGET while you're at it.

Suggested change
LLVM="${LLVM}" emerge-wrapper --target ${CTARGET} --init --profile ${PROFILE} || exit 1
LLVM="${LLVM}" emerge-wrapper --target "${CTARGET}" --init --profile "${PROFILE}" || exit 1

@@ -939,6 +940,7 @@ while [[ $# -gt 0 ]] ; do
--cpkg) shift; CPKG=$1;;
-ox|--ov-extra) shift; XOVLS+=( "$1" );;
--env) shift; AENV=$1;;
--profile) shift; PROFILE=$1;;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to tell in GitHub, but I think your whitespace is off here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants