Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #478 from euanh/fix-ln-race
Browse files Browse the repository at this point in the history
makesrpm: Avoid unlink races in ln -sf
  • Loading branch information
mseri authored Dec 11, 2017
2 parents d946203 + 296c3f1 commit 01232ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions planex/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,15 @@ endif
.DELETE_ON_ERROR:

.PHONY: all rpms
all: $(TOPDIR) $(RPMS)
all: $(RPMS)

$(RPMS): $(MOCK_CONFIGDIR)/$(MOCK_ROOT).cfg
$(RPMS): RPMS MANIFESTS $(MOCK_CONFIGDIR)/$(MOCK_ROOT).cfg

RPMS:
ln -s $(TOPDIR)/RPMS RPMS

MANIFESTS:
ln -s $(TOPDIR)/MANIFESTS MANIFESTS

$(TOPDIR)/RPMS/repodata/repomd.xml: $(RPMS)
$(AT)$(CREATEREPO) $(CREATEREPO_FLAGS) $(TOPDIR)/RPMS
Expand All @@ -92,7 +98,6 @@ clean:
$(TOPDIR)/MANIFESTS/%.json:
@echo [MANIFEST] $@
$(AT) mkdir -p $(@D)
$(AT) ln -sf $(@D)
$(AT)$(MANIFEST) $(MANIFEST_FLAGS) $^ > $@


Expand Down Expand Up @@ -140,7 +145,6 @@ $(TOPDIR)/SOURCES/%/patches.tar: $(PINSDIR)/%.pin FORCE
%.rpm:
@echo [MOCK] $<
$(AT) mkdir -p $(@D)
$(AT) ln -sf $(TOPDIR)/RPMS
$(AT)$(MOCK) $(MOCK_FLAGS) --rebuild $<


Expand Down

0 comments on commit 01232ad

Please sign in to comment.