diff options
author | Göktürk Yüksek <gokturk@gentoo.org> | 2020-01-29 18:14:08 -0500 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-01-29 23:20:30 +0000 |
commit | 7472a72787d046a4b47b752df64b4a8182fcf5ff (patch) | |
tree | 367e64735400e45098299ff3b718681e6804e2c7 | |
parent | crossdev: migrate from package.keywords to package.accept_keywords (diff) | |
download | crossdev-7472a72787d046a4b47b752df64b4a8182fcf5ff.tar.gz crossdev-7472a72787d046a4b47b752df64b4a8182fcf5ff.tar.bz2 crossdev-7472a72787d046a4b47b752df64b4a8182fcf5ff.zip |
crossdev: adjust repo-name in layout.conf based on repos.conf
When '--ov-output' is not provided, crossdev searches the list of
overlays for a repo matching the name "crossdev" or
"cross-${CTARGET}". When there is a match for "cross-${CTARGET}" but
the location does not exist, crossdev attempts to populate the overlay
structure. However, it incorrectly names the repo "crossdev" in
metadata/layout.conf under repo-name, as opposed to
"cross-${CTARGET}". This creates further problems when the list of
overlays is restricted using the '--overlays' option, given that the
name of the repo under repos.conf will not match what is in
layout.conf.
Use the correct repo-name when creating layout.conf. This preserves
the default behavior of using the repo-name "crossdev" when
'--ov-output' is provided.
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rwxr-xr-x | crossdev | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -503,11 +503,14 @@ setup_portage_vars() { # set up some repos.conf magic if possible. if not, # install our stuff to the first overlay in the list. if [[ -z ${CROSSDEV_OVERLAY} ]] ; then - local repo - for repo in "cross-${CTARGET}" crossdev ; do - repo=$(echo "${REPO_CONFIG}" | sed -n "/^${repo}:/s,^[^:]*:,,p") - if [[ -n ${repo} ]] ; then - CROSSDEV_OVERLAY=${repo} + local repo_path repo_name + for repo_name in "cross-${CTARGET}" crossdev ; do + repo_path=$(echo "${REPO_CONFIG}" | sed -n "/^${repo_name}:/s,^[^:]*:,,p") + if [[ -n ${repo_path} ]] ; then + CROSSDEV_OVERLAY=${repo_path} + # if we end up installing our stuff, save the name of the repo + # for further use in metadata/layout.conf + CROSSDEV_OVERLAY_NAME=${repo_name} break fi done @@ -702,6 +705,7 @@ XPKGS=() XVERS=() XUSES=() XENVS=() XOVLS=() DEFAULT_VER="[latest]" SEARCH_OVERLAYS="" CROSSDEV_OVERLAY="" +CROSSDEV_OVERLAY_NAME="crossdev" # These flags are always disabled for cross-gcc; either usually/always broken, or # not tested, or doesn't make sense, or no one simply cares about them GUSE_DISABLE="-boundschecking -d -gcj -gtk -libffi -mudflap -objc -objc++ -objc-gc" @@ -1181,7 +1185,7 @@ set_metadata() { # See if this repo is already named. f="${CROSSDEV_OVERLAY}/profiles/repo_name" repo_name=$(cat "${f}" 2>/dev/null) - : ${repo_name:="crossdev"} + : ${repo_name:="${CROSSDEV_OVERLAY_NAME}"} xmkdir -p "${meta}" if [[ -e ${layout} ]] ; then |