Support PATCHES_BASE, GIT_BASE, STX_BASE in build_srpm.data

Define PATCHES_BASE, GIT_BASE and STX_BASE within the build tools,
so that the can be refereced within build_srpm.data files.

STX_BASE: Synonym for i$CGCS_BASE.
          CGCS_BASE will be obsoleted in a future update.
GIT_BASE: New, points to the root of the git that contains the package.
          This will facilitate inter-package references that are
          co-located in the same git.
PATCHES_BASE: New, same as $PKG_BASE/$DISTRO/patches

Change-Id: I0636bb38b347374fa5ffe03ea67fd9d3422e2eea
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2018-06-27 16:01:27 -04:00
parent dc5abf144d
commit de12eed9d1
2 changed files with 10 additions and 3 deletions

View File

@ -19,6 +19,7 @@ DEFAULT_SRPM_SCRIPT="$DIR/default_$SRPM_SCRIPT"
SCRIPT_PATH="$DISTRO"
DATA_PATH="$DISTRO"
FILES_PATH="$DISTRO/files"
PATCHES_PATH="$DISTRO/patches"
ORIG_SPECS_PATH="$DISTRO"
SRPM_LIST_PATH="$DISTRO/srpm_path"
MIRROR_ROOT="$MY_REPO/cgcs-centos-repo"
@ -222,8 +223,10 @@ fi
export CCACHE_DIR="$BUILD_ROOT/.ccache"
export SRC_BASE="$SRC_ROOT"
export CGCS_BASE="$SRC_BASE/addons/wr-cgcs/layers/cgcs"
export STX_BASE="$CGCS_BASE"
export SPECS_BASE="$ORIG_SPECS_PATH"
export FILES_BASE="$FILES_PATH"
export PATCHES_BASE="$PATCHES_PATH"
export BUILD_BASE="$BUILD_ROOT"
BUILD_INPUTS="$BUILD_BASE/inputs"
@ -1194,8 +1197,9 @@ if [ "x$LOG_DIR" == "x" ]; then
echo "failed to create temporary directory"
exit 1;
fi
for g in $(find $SRC_BASE -type d -name .git | sort -V); do
for g in $(find "$SRC_BASE" -type d -name .git | sort -V); do
GIT_ROOT=$(dirname $g)
export GIT_BASE="$GIT_ROOT"
if [ $STOP_SCHEDULING -eq 1 ]; then
break;
fi

View File

@ -18,7 +18,7 @@ DEFAULT_SRPM_SCRIPT="$DIR/default_$SRPM_SCRIPT"
SCRIPT_PATH="$DISTRO"
DATA_PATH="$DISTRO"
FILES_PATH="$DISTRO/files"
# ORIG_SPECS_PATH="$DISTRO/rpmbuild/SPECS"
PATCHES_PATH="$DISTRO/patches"
ORIG_SPECS_PATH="$DISTRO"
SRPM_LIST_PATH="$DISTRO/srpm_path"
MIRROR_ROOT="$MY_REPO/cgcs-centos-repo"
@ -209,8 +209,10 @@ fi
export CCACHE_DIR="$BUILD_ROOT/.ccache"
export SRC_BASE="$SRC_ROOT"
export CGCS_BASE="$SRC_BASE/addons/wr-cgcs/layers/cgcs"
export STX_BASE="$CGCS_BASE"
export SPECS_BASE="$ORIG_SPECS_PATH"
export FILES_BASE="$FILES_PATH"
export PATCHES_BASE="$PATCHES_PATH"
export BUILD_BASE="$BUILD_ROOT"
BUILD_INPUTS="$BUILD_BASE/inputs"
@ -995,8 +997,9 @@ if [ $EDIT_FLAG -eq 0 ]; then
fi
fi
for g in `find $SRC_BASE -type d -name .git | sort -V`; do
for g in `find "$SRC_BASE" -type d -name .git | sort -V`; do
GIT_ROOT=$(dirname $g)
export GIT_BASE="$GIT_ROOT"
for p in $(cat $GIT_ROOT/$PKG_DIRS_FILE 2>> /dev/null); do
src_dir="$GIT_ROOT/$p"
if [ -d $src_dir ]; then