Hardlink only the rpms created by Mock

In case git repos cloned by autospec into results/ contain RPMs, we do
not want to hardlink those files to rpms/.

Fix the issue by limiting the find depth to 1 level so that the tooling
only hardlinks rpms created by Mock.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2018-08-08 19:10:47 -07:00
parent eb4fcd4085
commit fd509a2295
+1 -1
View File
@@ -158,7 +158,7 @@ require-pkg-repo-dir:
link-new-rpms: require-pkg-repo-dir
mkdir -p ${PKG_REPO_DIR}/rpms
rm -f ${PKG_REPO_DIR}/rpms/*.rpm
find ${PKG_REPO_DIR}/results -name '*.rpm' -exec ln {} ${PKG_REPO_DIR}/rpms/ \;
find ${PKG_REPO_DIR}/results -maxdepth 1 -name '*.rpm' -exec ln {} ${PKG_REPO_DIR}/rpms/ \;
rm -f ${PKG_REPO_DIR}/rpms/*.src.rpm