diff --git a/Makefile.common b/Makefile.common index 9baa6c9..9cae0aa 100644 --- a/Makefile.common +++ b/Makefile.common @@ -292,7 +292,7 @@ repoadd: results/build.log $(TOPLVL)/repo rm .repo-index; \ fi for r in $(LATEST_RPMS); do echo "+$$r"; echo $$(basename $$r) >> .repo-index; cp $$r $(TOPLVL)/repo; done - ( cd $(TOPLVL)/repo ; if type createrepo_c 1>/dev/null 2>&1; then createrepo_c .; else createrepo .; fi ); + $(MAKE) localrepocreate $(call localrepoenable,${PM_CONF},${MOCK_CONF}) #help repodel: Removes RPMs from the local RPM repository that were @@ -305,6 +305,7 @@ repodel: rm -f $(TOPLVL)/repo/$$r; \ done; \ rm .repo-index; \ + $(MAKE) localrepocreate; \ fi #help repoenable: Enables the local RPM repository for use with Yum/DNF and diff --git a/Makefile.functions b/Makefile.functions index 616ef99..c0c9be1 100644 --- a/Makefile.functions +++ b/Makefile.functions @@ -82,6 +82,10 @@ localrepodisable: @rm -f $(TOPLVL)/repo/.yum.conf @rm -f $(TOPLVL)/repo/.clear.cfg +# Runs createrepo_c (or createrepo) for the local RPM repo +localrepocreate: + ( cd $(TOPLVL)/repo ; if type createrepo_c 1>/dev/null 2>&1; then createrepo_c .; else createrepo .; fi ); + .PHONY: help ##### Code