build-iso failure due to missing repodata

Build-iso started failing due to the lack of
repodata in $MY_REPO/centos-repo/rt/Binary/ .

The problem was traced back to generate-centos-repo.sh
and an unintended modification of the dest_dir global
variable.  The unintended modification was due to
the new function copy_with_backup failing to use
'local' on it's internal variables.

Closes-bug: 1901920
Change-Id: If1c3928518552327af9e01a77b287849a1e3981b
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2020-10-28 12:00:34 -04:00
parent 44cda9d881
commit 33648c9b34
1 changed files with 3 additions and 3 deletions

View File

@ -385,9 +385,9 @@ process_lst_file () {
}
copy_with_backup () {
src_file="$1"
dest_dir="$2"
dest_file=${dest_dir}/$(basename ${src_file})
local src_file="$1"
local dest_dir="$2"
local dest_file=${dest_dir}/$(basename ${src_file})
if [ ! -f "${src_file}" ]; then
echo "source file '${src_file}' does not exist!"