Patchwork [in-clowncopter] buildrpm: mkdir -p two needed directories (issue4779)

login
register
mail settings
Submitter Augie Fackler
Date Sept. 1, 2015, 6:42 p.m.
Message ID <30104aecdcadc579f553.1441132950@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/10350/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 1, 2015, 6:42 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1441132901 14400
#      Tue Sep 01 14:41:41 2015 -0400
# Node ID 30104aecdcadc579f5532142620ef366e218eefc
# Parent  0a9009d56feaea3fbd7c5c5cede289c948dbe456
buildrpm: mkdir -p two needed directories (issue4779)

Without this, building RPMs can fail.

Patch

diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -56,6 +56,7 @@  else
     RPMPYTHONVER=%{nil}
 fi
 
+mkdir -p $RPMBUILDDIR/SOURCES
 $HG archive -t tgz $RPMBUILDDIR/SOURCES/mercurial-$version-$release.tar.gz
 if [ "$PYTHONVER" ]; then
 (
@@ -79,6 +80,7 @@  if [ "$PYTHONVER" ]; then
 )
 fi
 
+mkdir -p $RPMBUILDDIR/SPECS
 rpmspec=$RPMBUILDDIR/SPECS/mercurial.spec
 
 sed -e "s,^Version:.*,Version: $version," \