aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-09-17 15:17:06 -0400
committerMike Frysinger <vapier@gentoo.org>2014-09-17 15:17:06 -0400
commitaaa0e489fcfa0f08f894342adc33bb9c93745e0a (patch)
tree9385fbe8b2ad3bf6bc20e7c74f3ab57d140787d8
parentcross-pkg-config: set up PKG_CONFIG_SYSTEM_LIBRARY_PATH (diff)
downloadcrossdev-aaa0e489fcfa0f08f894342adc33bb9c93745e0a.tar.gz
crossdev-aaa0e489fcfa0f08f894342adc33bb9c93745e0a.tar.bz2
crossdev-aaa0e489fcfa0f08f894342adc33bb9c93745e0a.zip
crossdev: set repo-name in generated layout.conf
URL: http://crbug.com/415246 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-xcrossdev13
1 files changed, 11 insertions, 2 deletions
diff --git a/crossdev b/crossdev
index 56ddcda..29fe431 100755
--- a/crossdev
+++ b/crossdev
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
CROSSDEV_VER="@CDEVPV@"
@@ -931,8 +931,14 @@ set_metadata() {
# we really can do about that.
local autogen_tag="# Autogenerated and managed by crossdev"
local meta=${CROSSDEV_OVERLAY}/metadata
+ local repo_name
local layout=${meta}/layout.conf
- local d name masters thin_manifests="false"
+ local f d name masters thin_manifests="false"
+
+ # See if this repo is already named.
+ f="${CROSSDEV_OVERLAY}/profiles/repo_name"
+ repo_name=$(cat "${f}" 2>/dev/null)
+ : ${repo_name:="crossdev"}
mkdir -p "${meta}"
if [[ -e ${layout} ]] ; then
@@ -954,6 +960,8 @@ set_metadata() {
name=$(<"${d}"/profiles/repo_name)
fi
[[ -z ${name} ]] && continue
+ # Don't list ourselves as a master.
+ [[ ${name} == "${repo_name}" ]] && continue
# If this repo has an eclass dir, mark it as a master.
# Note: portage reads the masters list in reverse order,
@@ -988,6 +996,7 @@ set_metadata() {
${autogen_tag}
# Delete the above line if you want to manage this file yourself
masters = ${masters% }
+ repo-name = ${repo_name}
$(printf '%b' "${this_manifests}")
EOF
}