Patchwork [2,of,8,stable] packaging: move dockerrpm output directory creation to dockerrpm

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 1, 2019, 2:40 p.m.
Message ID <b6c904e28f35efa5fcb6.1572619230@madski>
Download mbox | patch
Permalink /patch/42638/
State Accepted
Headers show

Comments

Mads Kiilerich - Nov. 1, 2019, 2:40 p.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1572607097 -3600
#      Fri Nov 01 12:18:17 2019 +0100
# Branch stable
# Node ID b6c904e28f35efa5fcb6162a72e4acb19899f183
# Parent  a29e42f5492266b779ab24ac4496211c947c6601
packaging: move dockerrpm output directory creation to dockerrpm

Avoid having to compute the directory in two places in different environments.

Patch

diff --git a/contrib/packaging/Makefile b/contrib/packaging/Makefile
--- a/contrib/packaging/Makefile
+++ b/contrib/packaging/Makefile
@@ -105,7 +105,6 @@  fedora$(1):
 
 .PHONY: docker-fedora$(1)
 docker-fedora$(1):
-	mkdir -p $$(HGROOT)/packages/fedora$(1)
 	./dockerrpm fedora$(1)
 
 endef
@@ -123,7 +122,6 @@  centos$(1):
 
 .PHONY: docker-centos$(1)
 docker-centos$(1):
-	mkdir -p $$(HGROOT)/packages/centos$(1)
 	./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython)
 
 endef
diff --git a/contrib/packaging/dockerrpm b/contrib/packaging/dockerrpm
--- a/contrib/packaging/dockerrpm
+++ b/contrib/packaging/dockerrpm
@@ -21,6 +21,7 @@  fi
 $BUILDDIR/hg-docker build --build-arg UID=$DOCKERUID --build-arg GID=$DOCKERGID $BUILDDIR/docker/$PLATFORM $CONTAINER
 
 RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM
+mkdir -p $RPMBUILDDIR
 $ROOTDIR/contrib/packaging/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
 
 DSHARED=/mnt/shared