]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- try checking and creating build dirs after spec parse (PLD _specdir dir contains...
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 13 Jan 2020 22:32:34 +0000 (23:32 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 13 Jan 2020 22:32:34 +0000 (23:32 +0100)
create-build-tree-after-parse.patch [new file with mode: 0644]
rpm.spec

diff --git a/create-build-tree-after-parse.patch b/create-build-tree-after-parse.patch
new file mode 100644 (file)
index 0000000..f81468a
--- /dev/null
@@ -0,0 +1,30 @@
+--- rpm-4.15.1/rpmbuild.c~     2019-06-26 16:17:31.000000000 +0200
++++ rpm-4.15.1/rpmbuild.c      2020-01-13 23:29:36.442259031 +0100
+@@ -435,13 +435,6 @@
+     if (ba->buildRootOverride)
+       buildRootURL = rpmGenPath(NULL, ba->buildRootOverride, NULL);
+-    /* Create build tree if necessary */
+-    const char * buildtree = "%{_topdir}:%{_specdir}:%{_sourcedir}:%{_builddir}:%{_rpmdir}:%{_srcrpmdir}:%{_buildrootdir}";
+-    const char * rootdir = rpmtsRootDir(ts);
+-    if (rpmMkdirs(!rstreq(rootdir, "/") ? rootdir : NULL , buildtree)) {
+-      goto exit;
+-    }
+-
+     if (buildMode == 't') {
+       char *srcdir = NULL, *dir;
+@@ -508,6 +501,13 @@
+       goto exit;
+     }
++    /* Create build tree if necessary */
++    const char * buildtree = "%{_topdir}:%{_specdir}:%{_sourcedir}:%{_builddir}:%{_rpmdir}:%{_srcrpmdir}:%{_buildrootdir}";
++    const char * rootdir = rpmtsRootDir(ts);
++    if (rpmMkdirs(!rstreq(rootdir, "/") ? rootdir : NULL , buildtree)) {
++      goto exit;
++    }
++
+     if ((rc = rpmSpecBuild(ts, spec, ba))) {
+       goto exit;
+     }
index 16bc4ec193268317037547391f51e61d8ec04239..93459ce44fc81d2213138967a50410a0ecddc672 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -80,6 +80,7 @@ Patch15:      x32.patch
 Patch16:       %{name}-add-compress-doc.patch
 Patch17:       rpm5-db-compat.patch
 Patch18:       python-internal-build.patch
+Patch19:       create-build-tree-after-parse.patch
 URL:           https://rpm.org/
 BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver}
 BuildRequires: %{reqdb_pkg}-sql-devel >= %{reqdb_pkgver}
@@ -596,6 +597,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
+%patch19 -p1
 
 install %{SOURCE16} scripts/perl.prov.in
 
This page took 0.229477 seconds and 4 git commands to generate.