Copy changelog in one thread at a time
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
7b81210f7b
commit
82285fa5c1
1
rpm.spec
1
rpm.spec
@ -52,6 +52,7 @@ Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
||||
# https://github.com/rpm-software-management/rpm/issues/742
|
||||
#Patch7: 0001-Revert-Run-binary-package-generation-in-parallel-thr.patch
|
||||
Patch7: 0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch
|
||||
Patch8: test.diff
|
||||
|
||||
# Patches already upstream:
|
||||
|
||||
|
47
test.diff
47
test.diff
@ -1,47 +1,12 @@
|
||||
diff --git a/build/pack.c b/build/pack.c
|
||||
index 447e3ec94..21f22d5ca 100644
|
||||
index ab72750be..e6cec1816 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;
|
||||
@@ -713,6 +713,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
|
||||
}
|
||||
|
||||
/* 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) {
|
||||
/* Copy changelog from src rpm */
|
||||
+ #pragma omp critical
|
||||
+ rc = pkg->rc;
|
||||
+ }
|
||||
+ } /* omp task */
|
||||
+ if (rc)
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
- } /* omp task */
|
||||
- if (rc)
|
||||
- break;
|
||||
}
|
||||
headerCopyTags(spec->sourcePackage->header, pkg->header, copyTags);
|
||||
|
||||
/* Now check the package set if enabled */
|
||||
headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
|
||||
|
Loading…
Reference in New Issue
Block a user