Copy changelog in one thread at a time

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2019-06-11 13:45:21 +02:00
parent 7b81210f7b
commit 82285fa5c1
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
2 changed files with 8 additions and 42 deletions

View File

@ -52,6 +52,7 @@ Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
# https://github.com/rpm-software-management/rpm/issues/742 # https://github.com/rpm-software-management/rpm/issues/742
#Patch7: 0001-Revert-Run-binary-package-generation-in-parallel-thr.patch #Patch7: 0001-Revert-Run-binary-package-generation-in-parallel-thr.patch
Patch7: 0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch Patch7: 0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch
Patch8: test.diff
# Patches already upstream: # Patches already upstream:

View File

@ -1,47 +1,12 @@
diff --git a/build/pack.c b/build/pack.c diff --git a/build/pack.c b/build/pack.c
index 447e3ec94..21f22d5ca 100644 index ab72750be..e6cec1816 100644
--- a/build/pack.c --- a/build/pack.c
+++ b/build/pack.c +++ b/build/pack.c
@@ -742,25 +742,28 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch @@ -713,6 +713,7 @@ 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 */ /* Copy changelog from src rpm */
+ #pragma omp critical
headerCopyTags(spec->sourcePackage->header, pkg->header, copyTags);
headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);