From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 89AC2138350 for ; Wed, 29 Jan 2020 23:21:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE9B6E0817; Wed, 29 Jan 2020 23:21:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 856F5E0817 for ; Wed, 29 Jan 2020 23:21:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 569E034E500 for ; Wed, 29 Jan 2020 23:21:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 37E5E9C for ; Wed, 29 Jan 2020 23:20:59 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1580340030.7472a72787d046a4b47b752df64b4a8182fcf5ff.slyfox@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: / X-VCS-Repository: proj/crossdev X-VCS-Files: crossdev X-VCS-Directories: / X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 7472a72787d046a4b47b752df64b4a8182fcf5ff X-VCS-Branch: master Date: Wed, 29 Jan 2020 23:20:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3cd0ff4b-6a4b-4404-ac7e-c03b35832920 X-Archives-Hash: e45687cde0c5625bd15b17cf0b36ce20 commit: 7472a72787d046a4b47b752df64b4a8182fcf5ff Author: Göktürk Yüksek gentoo org> AuthorDate: Wed Jan 29 23:14:08 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Wed Jan 29 23:20:30 2020 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=7472a727 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 gentoo.org> Signed-off-by: Sergei Trofimovich gentoo.org> crossdev | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crossdev b/crossdev index 1722942..8783a9a 100755 --- a/crossdev +++ b/crossdev @@ -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