commit:     9126e17807c290e45cdd46e66004177117ff1078
Author:     Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Tue Jun  2 17:00:30 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jun  2 17:01:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=9126e178

crossdev: support repo-name in layout.conf

When building repos that only use repo-name in layout.conf, crossdev
does not properly build the masters setting for its own layout.conf.

Signed-off-by: Mike Frysinger <vapier <AT> chromium.org>

 crossdev | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/crossdev b/crossdev
index b5f9245..b501ad8 100755
--- a/crossdev
+++ b/crossdev
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 CROSSDEV_VER="@CDEVPV@"
@@ -1044,7 +1044,10 @@ set_metadata() {
                [[ -z ${d} ]] && continue
 
                name=
-               if [[ -e ${d}/profiles/repo_name ]] ; then
+               if [[ -e ${d}/metadata/layout.conf ]] ; then
+                       name=$(awk '$1 == "repo-name" { print $3 }' 
"${d}/metadata/layout.conf")
+               fi
+               if [[ -z ${name} && -e ${d}/profiles/repo_name ]] ; then
                        name=$(<"${d}"/profiles/repo_name)
                fi
                [[ -z ${name} ]] && continue

Reply via email to