Revert "Fix selection of a release specific mock prototype"
This reverts commit 72d1905384
.
Reason for revert: Breaks when 'Add support CentOS-8/dnf/mock-2.6 based builds' was reverted from root
Change-Id: I05c337fc8d054253b56b2ed9dba874ca278cbbdd
This commit is contained in:
parent
72d1905384
commit
e875862d50
|
@ -128,16 +128,11 @@ timestamp="$(date +%F_%H%M)"
|
|||
mock_cfg_prefix="mock.cfg"
|
||||
mock_cfg_default_suffix="proto"
|
||||
mock_cfg_suffix="${mock_cfg_default_suffix}"
|
||||
mock_cfg_distro=""
|
||||
mock_cfg_src_prefix=${mock_cfg_prefix}
|
||||
if [ -f /etc/os-release ]; then
|
||||
mock_cfg_distro="$(source /etc/os-release; echo ${ID}${VERSION_ID}.proto)"
|
||||
fi
|
||||
mock_cfg_dir=$MY_REPO/build-tools/repo_files
|
||||
mock_cfg_dest_dir=$MY_REPO/centos-repo
|
||||
if [ -f /etc/os-release ]; then
|
||||
mock_cfg_distro="$(source /etc/os-release; echo ${ID}${VERSION_ID})"
|
||||
if [ ! -z "${mock_cfg_distro}" ]; then
|
||||
mock_cfg_src_prefix=${mock_cfg_prefix}.${mock_cfg_distro}
|
||||
fi
|
||||
fi
|
||||
comps_xml_file=$MY_REPO/build-tools/repo_files/comps.xml
|
||||
comps_xml_dest_dir=$MY_REPO/centos-repo/Binary
|
||||
|
||||
|
@ -417,7 +412,7 @@ copy_with_backup () {
|
|||
|
||||
if [ ! -d ${dest_dir} ]; then
|
||||
dest_file="$2"
|
||||
dest_dir=$(dirname ${dest_file})
|
||||
dest_dir=$(dir_name ${dest_file})
|
||||
if [ ! -d ${dest_dir} ]; then
|
||||
echo "destination directory '${dest_dir}' does not exist!"
|
||||
exit 1
|
||||
|
@ -473,13 +468,13 @@ done
|
|||
echo "Copying mock.cfg.proto file."
|
||||
|
||||
# First look for layer specific file to copy.
|
||||
mock_cfg_file="${mock_cfg_dir}/${mock_cfg_src_prefix}.${layer}.${mock_cfg_suffix}"
|
||||
mock_cfg_file="${mock_cfg_dir}/${mock_cfg_prefix}.${layer}.${mock_cfg_suffix}"
|
||||
if [ -f "$mock_cfg_file" ]; then
|
||||
copy_with_backup ${mock_cfg_file} ${mock_cfg_dest_dir}/${mock_cfg_prefix}.${layer}.${mock_cfg_default_suffix}
|
||||
fi
|
||||
|
||||
# Always copy the default
|
||||
mock_cfg_file=${mock_cfg_dir}/${mock_cfg_src_prefix}.${mock_cfg_suffix}
|
||||
mock_cfg_file=${mock_cfg_dir}/${mock_cfg_prefix}.${mock_cfg_suffix}
|
||||
copy_with_backup ${mock_cfg_file} ${mock_cfg_dest_dir}/${mock_cfg_prefix}.${mock_cfg_default_suffix}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue