Try some probably non-working fix

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2019-06-10 23:46:41 +02:00
parent 81c625136e
commit 68ce99e7f4
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
2 changed files with 49 additions and 0 deletions

View File

@ -57,6 +57,8 @@ Patch906: rpm-4.7.1-geode-i686.patch
# Probably to be upstreamed in slightly different form # Probably to be upstreamed in slightly different form
Patch907: rpm-4.15.x-ldflags.patch Patch907: rpm-4.15.x-ldflags.patch
Patch999: test.diff
# Partially GPL/LGPL dual-licensed and some bits with BSD # Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
License: GPLv2+ License: GPLv2+

47
test.diff Normal file
View File

@ -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 */