diff --git a/libguestfs.spec b/libguestfs.spec index 4530d3efa4b61daa8fa40926260d57332093292c..aa5ba54e5cf5a17dfbeb75e3ce495ca70062cc6a 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -198,7 +198,10 @@ if ping -c 3 -w 20 8.8.8.8; then extra= else mkdir cachedir repo - find /var/cache/{dnf,yum} -type f -name '*.rpm' -print0 | xargs -0 -n 1 cp -t repo + findres=`find /var/cache/dnf -type f -name '*.rpm' -print0` +if [ ! -z "$findres"]; then + echo $find_res | xargs -0 -n 1 cp -t repo +fi createrepo repo sed -e "s|@PWD@|$(pwd)|" %{SOURCE2} > yum.conf extra=--with-supermin-packager-config=$(pwd)/yum.conf @@ -364,6 +367,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/ %exclude %{_mandir}/man1/virt-tar.1* %changelog +* Tue 20 Jul 2021 sunguoshuai - 1:1.40.2-14 +- No /var/cache/yum in build environment and add test incase no cached rpms. + * Mon Mar 22 2021 lingsheng - 1:1.40.2-14 - Remove wget check