[cpp-linbuild] 01/02: Ensure local repo is valid before build

John W. O'Brien john at saltant.com
Fri Feb 3 15:57:20 UTC 2023


This is an automated email from the git hooks/post-receive script.

obrienjw pushed a commit to branch main
in repository cpp-linbuild.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-linbuild.git;a=commit;h=c1129abc0e22ce33601bae39b4fe7c32682f3698

commit c1129abc0e22ce33601bae39b4fe7c32682f3698
Author: John W. O'Brien <john at saltant.com>
AuthorDate: Fri Feb 3 15:30:52 2023 +0000

    Ensure local repo is valid before build
---
 common/build.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/build.sh b/common/build.sh
index 9da586f..cc6b671 100644
--- a/common/build.sh
+++ b/common/build.sh
@@ -15,6 +15,14 @@ else
     arch=$machine_arch
 fi
 
+localrepo=${EXT_BASE}/out/RPMS/${arch}
+
+if [ ! -e ${localrepo}/repodata/repomd.xml ]; then
+    # Initialize empty local RPM repository
+    mkdir -p ${localrepo}
+    createrepo_c ${localrepo}
+fi
+
 # Install dependencies
 yum-config-manager --enable local
 yum-builddep -y ${component}.spec
@@ -27,4 +35,4 @@ rpmspec -q --rpms ${component}.spec > ${EXT_BASE}/out/${component}.rpms
 rpmspec -q --srpm ${component}.spec > ${EXT_BASE}/out/${component}.srpm
 
 # Generate/update local RPM repository
-createrepo_c ${EXT_BASE}/out/RPMS/${arch}
+createrepo_c ${localrepo}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list