From b0c0d40010b58ff2d02f1df05c3783844ddd74fe Mon Sep 17 00:00:00 2001 From: si-gui Date: Tue, 20 Jul 2021 16:20:11 +0800 Subject: [PATCH] No /var/cache/yum in build environment and add test incase no cached rpms. --- libguestfs.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libguestfs.spec b/libguestfs.spec index 207517e..304409f 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -4,7 +4,7 @@ Name: libguestfs Version: 1.40.2 -Release: 11 +Release: 12 Epoch: 1 Summary: A set of tools for accessing and modifying virtual machine (VM) disk images License: LGPLv2+ @@ -204,7 +204,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 @@ -375,6 +378,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-12 +- No /var/cache/yum in build environment and add test incase no cached rpms. + * Thu Mar 25 2021 lingsheng - 1:1.40.2-11 - Remove wget check -- Gitee