Skip to content
Snippets Groups Projects
Commit 3beed4bb authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

fixup(c/22962): whitespace & error reporting

Change-Id: I320c7e3d3bf6c2fb1f05a69306f4e70743effa2d
parent 8752f8fd
No related branches found
No related tags found
No related merge requests found
......@@ -308,7 +308,11 @@ install_from_buildcache() {
_install_from_buildcache() {
# only extract the hashes present in buildcache on first invocation
if (( "$(wc -l <"${FILE_HASHES_BUILDCACHE}")" == 0 )); then
size_file_hashes=0
if [ -e "${FILE_HASHES_BUILDCACHE}" ]; then
size_file_hashes="$(wc -l <"${FILE_HASHES_BUILDCACHE}")"
fi
if (( "${size_file_hashes}" == 0 )); then
compute_hashes_buildcache
fi
......
......@@ -180,10 +180,13 @@ fi
fetch_specfiles=()
for package in "${packages_to_fetch[@]}"; do
specfile="$(get_specfile_name "${package}")"
echo "Specfile for ${package} is ${specfile}."
word_count=$(wc -l <"${specfile}")
echo "Word count ${word_count}"
if (( $(wc -l <"${specfile}") == 0 )); then
echo "Specfile for ${package} is ${specfile}."
word_count=0
if [ -e "${specfile}" ]; then
word_count=$(wc -l <"${specfile}")
fi
echo "Specfile word count ${word_count}"
if [ "${word_count}" -eq 0 ]; then
echo "${package} failed to concretize!" >&2
exit 1
fi
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment