Rename cgcs-tis-repo to local-repo

Both the repo and scripts need to be updated for this rename
There is a corresponding change needed to the starlingx/root
repo.

This is tested with a clean build and rebuild to ensure RPMs
are found correctly.

Story: 2006387
Task: 36910
Depends-On: https://review.opendev.org/749974
Depends-On: https://review.opendev.org/750042
Change-Id: I997728f3283077365555eeb9bdbe028ccac255f1
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Saul Wold 2019-10-03 15:28:44 -07:00 committed by Scott Little
parent 3f1489d63f
commit 4e73613a36
3 changed files with 22 additions and 22 deletions

View File

@ -126,7 +126,7 @@ RUN groupadd -g 751 cgts && \
# copied inside the image. # copied inside the image.
COPY toCOPY/finishSetup.sh /usr/local/bin COPY toCOPY/finishSetup.sh /usr/local/bin
COPY toCOPY/populate_downloads.sh /usr/local/bin COPY toCOPY/populate_downloads.sh /usr/local/bin
COPY toCOPY/generate-cgcs-tis-repo /usr/local/bin COPY toCOPY/generate-local-repo.sh /usr/local/bin
COPY toCOPY/generate-cgcs-centos-repo.sh /usr/local/bin COPY toCOPY/generate-cgcs-centos-repo.sh /usr/local/bin
COPY toCOPY/lst_utils.sh /usr/local/bin COPY toCOPY/lst_utils.sh /usr/local/bin
COPY toCOPY/.inputrc /home/$MYUNAME/ COPY toCOPY/.inputrc /home/$MYUNAME/

View File

@ -314,16 +314,16 @@ To build all packages:
$ cd $MY_REPO $ cd $MY_REPO
$ build-pkgs or build-pkgs --clean <pkglist>; build-pkgs <pkglist> $ build-pkgs or build-pkgs --clean <pkglist>; build-pkgs <pkglist>
To generate cgcs-tis-repo: To generate local-repo:
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
The cgcs-tis-repo has the dependency information that sequences the The local-repo has the dependency information that sequences the
build order; To generate or update the information the following command build order; To generate or update the information the following command
needs to be executed after building modified or new packages. needs to be executed after building modified or new packages.
.. code-block:: bash .. code-block:: bash
$ generate-cgcs-tis-repo $ generate-local-repo.sh
To make an iso: To make an iso:
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~

View File

@ -29,9 +29,9 @@ DEST_RPM="${DEST_RPM_ROOT_NEW}/Packages"
DEST_SRPM="${DEST_SRPM_ROOT_NEW}/SPackages" DEST_SRPM="${DEST_SRPM_ROOT_NEW}/SPackages"
DEST_RPM_REPODATA="${DEST_RPM_ROOT_NEW}/repodata" DEST_RPM_REPODATA="${DEST_RPM_ROOT_NEW}/repodata"
DEST_SRPM_REPODATA="${DEST_SRPM_ROOT_NEW}/repodata" DEST_SRPM_REPODATA="${DEST_SRPM_ROOT_NEW}/repodata"
TIS_REPO_DIR="${MY_REPO}/cgcs-tis-repo" LOCAL_REPO_DIR="${MY_REPO}/local-repo"
TIS_CACHE_DIR="${TIS_REPO_DIR}/dependancy-cache" LOCAL_CACHE_DIR="${LOCAL_REPO_DIR}/dependancy-cache"
TIS_CACHE_ORIGIN="${TIS_REPO_DIR}/origin" LOCAL_CACHE_ORIGIN="${LOCAL_REPO_DIR}/origin"
ORIGIN="/import/mirrors/CentOS/${SRC_BUILD_ENVIRONMENT}/CentOS" ORIGIN="/import/mirrors/CentOS/${SRC_BUILD_ENVIRONMENT}/CentOS"
CREATEREPO=$(which createrepo_c) CREATEREPO=$(which createrepo_c)
@ -40,17 +40,17 @@ if [ $? -ne 0 ]; then
fi fi
# Create directories # Create directories
for d in "$DEST_RPM" "$DEST_SRPM" "$TIS_CACHE_DIR"; do for d in "$DEST_RPM" "$DEST_SRPM" "$LOCAL_CACHE_DIR"; do
if [ ! -d "$d" ]; then if [ ! -d "$d" ]; then
mkdir -p "$d" mkdir -p "$d"
fi fi
done done
if [ ! -e "$TIS_CACHE_ORIGIN" ]; then if [ ! -e "$LOCAL_CACHE_ORIGIN" ]; then
echo "$ORIGIN" > $TIS_CACHE_ORIGIN echo "$ORIGIN" > $LOCAL_CACHE_ORIGIN
ORIGIN_DIR="$ORIGIN" ORIGIN_DIR="$ORIGIN"
else else
ORIGIN_DIR=$(grep -v '^#' $TIS_CACHE_ORIGIN | head -n 1) ORIGIN_DIR=$(grep -v '^#' $LOCAL_CACHE_ORIGIN | head -n 1)
fi fi
if [ ! -d "$ORIGIN_DIR" ]; then if [ ! -d "$ORIGIN_DIR" ]; then
@ -99,28 +99,28 @@ fi
mv "$DEST_SRPM_ROOT_NEW" "$DEST_SRPM_ROOT" mv "$DEST_SRPM_ROOT_NEW" "$DEST_SRPM_ROOT"
rm -rf "$DEST_SRPM_ROOT_OLD" rm -rf "$DEST_SRPM_ROOT_OLD"
# Update symlinks in cgcs-tis-repo # Update symlinks in local-repo
for d in $(find "$ORIGIN_DIR" -type d | tail -n +2); do for d in $(find "$ORIGIN_DIR" -type d | tail -n +2); do
RELATIVE_DIR=$(echo $d | sed "s#^$ORIGIN_DIR/##") RELATIVE_DIR=$(echo $d | sed "s#^$ORIGIN_DIR/##")
if [ -d "${TIS_REPO_DIR}/${RELATIVE_DIR}" ]; then if [ -d "${LOCAL_REPO_DIR}/${RELATIVE_DIR}" ]; then
rm -rf "${TIS_REPO_DIR}/${RELATIVE_DIR}/*" rm -rf "${LOCAL_REPO_DIR}/${RELATIVE_DIR}/*"
fi fi
echo "mkdir -p $RELATIVE_DIR" echo "mkdir -p $RELATIVE_DIR"
mkdir -p "${TIS_REPO_DIR}/${RELATIVE_DIR}" mkdir -p "${LOCAL_REPO_DIR}/${RELATIVE_DIR}"
done done
for d in $(find "$ORIGIN_DIR" -type d | tail -n +2); do for d in $(find "$ORIGIN_DIR" -type d | tail -n +2); do
for f in $(find $d -maxdepth 1 -type f); do for f in $(find $d -maxdepth 1 -type f); do
RELATIVE_FILE=$(echo $f | sed "s#^$ORIGIN_DIR/##") RELATIVE_FILE=$(echo $f | sed "s#^$ORIGIN_DIR/##")
if [ -e "${TIS_REPO_DIR}/${RELATIVE_FILE}" ]; then if [ -e "${LOCAL_REPO_DIR}/${RELATIVE_FILE}" ]; then
rm -f "${TIS_REPO_DIR}/${RELATIVE_FILE}" rm -f "${LOCAL_REPO_DIR}/${RELATIVE_FILE}"
fi fi
ln -s "$f" "${TIS_REPO_DIR}/${RELATIVE_FILE}" ln -s "$f" "${LOCAL_REPO_DIR}/${RELATIVE_FILE}"
done done
done done
for d in $(find -L "$TIS_REPO_DIR" -type d -name repodata); do for d in $(find -L "$LOCAL_REPO_DIR" -type d -name repodata); do
pushd "${d}/.." pushd "${d}/.."
rm -rf repodata rm -rf repodata
if [ -f "comps.xml" ]; then if [ -f "comps.xml" ]; then
@ -132,7 +132,7 @@ for d in $(find -L "$TIS_REPO_DIR" -type d -name repodata); do
done done
# Recreate repodata # Recreate repodata
cd "$TIS_REPO_DIR" cd "$LOCAL_REPO_DIR"
for d in $(find -L . -type d -name repodata); do for d in $(find -L . -type d -name repodata); do
pushd "${d}/.." pushd "${d}/.."
@ -150,5 +150,5 @@ for d in $(find -L . -type d -name repodata); do
popd popd
done done
# Update the dependancy_cache under cgcs-tis-repo # Update the dependancy_cache under local-repo
create_dependancy_cache.py --cache_dir "${TIS_CACHE_DIR}" create_dependancy_cache.py --cache_dir "${LOCAL_CACHE_DIR}"