local repo: run createrepo after 'repodel' removes RPMs

To ensure that RPM repo metadata is always up-to-date for the local
repo, make sure createrepo is run after removing the RPMs.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
Patrick McCarty
2018-03-06 16:56:47 -08:00
parent a9982b4064
commit ab142ead38
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -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
+4
View File
@@ -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