mirror of
https://github.com/clearlinux/common.git
synced 2026-10-03 23:38:20 +00:00
local repo: unhide local repo conf files
To make sure the conf files are more visible in the local repo directory, unhide them by installing them without a leading dot character. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
+2
-2
@@ -19,10 +19,10 @@ RPMS ?= $(LATEST_RPMS)
|
||||
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
|
||||
ifeq ($(wildcard $(TOPLVL)/repo/.clear.cfg),)
|
||||
ifeq ($(wildcard $(TOPLVL)/repo/clear.cfg),)
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONF)
|
||||
else
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(TOPLVL)/repo/.clear.cfg
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(TOPLVL)/repo/clear.cfg
|
||||
USE_LOCAL_REPO = 1
|
||||
endif
|
||||
|
||||
|
||||
+11
-11
@@ -67,20 +67,20 @@ endef
|
||||
# argument is the path to the mock config. Each of these config files is
|
||||
# augmented for local repo support.
|
||||
define localrepoenable
|
||||
@cp $(1) $(TOPLVL)/repo/.yum.conf
|
||||
@printf "\n\n[local]\nname=Local\nfailovermethod=priority\nenabled=1\ngpgcheck=0\n" >> $(TOPLVL)/repo/.yum.conf
|
||||
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/.yum.conf
|
||||
@cp $(2) $(TOPLVL)/repo/.clear.cfg
|
||||
@printf "\n\n[localrepo]\nname=Local repo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\n" >> $(TOPLVL)/repo/.clear.cfg
|
||||
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/.clear.cfg
|
||||
@sed -i '/^"""/d; $$a"""' $(TOPLVL)/repo/.clear.cfg
|
||||
@cp $(1) $(TOPLVL)/repo/yum.conf
|
||||
@printf "\n\n[local]\nname=Local\nfailovermethod=priority\nenabled=1\ngpgcheck=0\n" >> $(TOPLVL)/repo/yum.conf
|
||||
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/yum.conf
|
||||
@cp $(2) $(TOPLVL)/repo/clear.cfg
|
||||
@printf "\n\n[localrepo]\nname=Local repo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\n" >> $(TOPLVL)/repo/clear.cfg
|
||||
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/clear.cfg
|
||||
@sed -i '/^"""/d; $$a"""' $(TOPLVL)/repo/clear.cfg
|
||||
endef
|
||||
|
||||
# Disables the local RPM repo by removing the installed package manager and
|
||||
# Mock configuration files.
|
||||
localrepodisable:
|
||||
@rm -f $(TOPLVL)/repo/.yum.conf
|
||||
@rm -f $(TOPLVL)/repo/.clear.cfg
|
||||
@rm -f $(TOPLVL)/repo/yum.conf
|
||||
@rm -f $(TOPLVL)/repo/clear.cfg
|
||||
|
||||
# Runs createrepo_c (or createrepo) for the local RPM repo
|
||||
localrepocreate:
|
||||
@@ -96,12 +96,12 @@ localrepostatus:
|
||||
echo '** Local repo not found'; \
|
||||
exit 0; \
|
||||
fi; \
|
||||
if [ -f $(TOPLVL)/repo/.yum.conf ]; then \
|
||||
if [ -f $(TOPLVL)/repo/yum.conf ]; then \
|
||||
echo '** Local repo enabled for Yum/DNF.'; \
|
||||
else \
|
||||
echo '** Local repo not enabled for Yum/DNF.'; \
|
||||
fi; \
|
||||
if [ -f $(TOPLVL)/repo/.clear.cfg ]; then \
|
||||
if [ -f $(TOPLVL)/repo/clear.cfg ]; then \
|
||||
echo '** Local repo enabled for Mock.'; \
|
||||
else \
|
||||
echo '** Local repo not enabled for Mock.'; \
|
||||
|
||||
Reference in New Issue
Block a user