From 68ce99e7f42f9d321c2d3ff4446ab1308493f552 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 10 Jun 2019 23:46:41 +0200 Subject: [PATCH] Try some probably non-working fix Signed-off-by: Igor Gnatenko --- rpm.spec | 2 ++ test.diff | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 test.diff diff --git a/rpm.spec b/rpm.spec index 5ada8b3..1342342 100644 --- a/rpm.spec +++ b/rpm.spec @@ -57,6 +57,8 @@ Patch906: rpm-4.7.1-geode-i686.patch # Probably to be upstreamed in slightly different form Patch907: rpm-4.15.x-ldflags.patch +Patch999: test.diff + # Partially GPL/LGPL dual-licensed and some bits with BSD # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD License: GPLv2+ diff --git a/test.diff b/test.diff new file mode 100644 index 0000000..48746df --- /dev/null +++ b/test.diff @@ -0,0 +1,47 @@ +diff --git a/build/pack.c b/build/pack.c +index 447e3ec94..21f22d5ca 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -742,25 +742,28 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) + { + rpmRC rc = RPMRC_OK; +- Package pkg; + + /* Run binary creation in parallel */ + #pragma omp parallel +- #pragma omp single +- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { +- #pragma omp task ++ { ++ #pragma omp single + { +- pkg->rc = packageBinary(spec, pkg, cookie, cheating, &pkg->filename); +- rpmlog(RPMLOG_DEBUG, +- _("Finished binary package job, result %d, filename %s\n"), +- pkg->rc, pkg->filename); +- if (pkg->rc) { +- #pragma omp critical +- rc = pkg->rc; ++ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) { ++ #pragma omp task ++ { ++ pkg->rc = packageBinary(spec, pkg, cookie, cheating, &pkg->filename); ++ rpmlog(RPMLOG_DEBUG, ++ _("Finished binary package job, result %d, filename %s\n"), ++ pkg->rc, pkg->filename); ++ if (pkg->rc) { ++ #pragma omp critical ++ rc = pkg->rc; ++ } ++ } /* omp task */ ++ if (rc) ++ break; ++ } + } +- } /* omp task */ +- if (rc) +- break; + } + + /* Now check the package set if enabled */