Safer way to copy RPMs in no-net builds (Jim Meyering).
authorRichard Jones <rjones@redhat.com>
Thu, 30 Apr 2009 15:09:50 +0000 (16:09 +0100)
committerRichard Jones <rjones@redhat.com>
Thu, 30 Apr 2009 15:09:50 +0000 (16:09 +0100)
libguestfs.spec.in

index 87dbcd2..fa55014 100644 (file)
@@ -238,10 +238,8 @@ Requires:    jpackage-utils
 %build
 %if %{buildnonet}
 mkdir repo
-pushd repo
-cp $(find /var/cache/yum/build -name '*.rpm') .
-createrepo .
-popd
+find /var/cache/yum/build -type f -name '*.rpm' -print0 | xargs -0 cp -t repo
+createrepo repo
 %define extra --with-mirror=file://$(pwd)/repo --with-repo=fedora-12
 %else
 %define extra %nil