Add patch to hopefully close race condition in systemd builds
- Related to https://bugzilla.redhat.com/show_bug.cgi?id=1249051
This commit is contained in:
parent
151857f77e
commit
f0b91355af
38
intltool-merge-Create-cache-file-atomically.patch
Normal file
38
intltool-merge-Create-cache-file-atomically.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From d328542bea50b9445c63cdf2454052392282a1ce Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Thu, 8 Oct 2015 16:25:47 -0400
|
||||
Subject: [PATCH] intltool-merge: Create cache file atomically
|
||||
|
||||
It's going to be relatively common for build systems operating in
|
||||
parallel to run multiple copies of `intltool-merge`, yet the cache
|
||||
file is not created atomically (i.e. with the "open .tmp file and
|
||||
rename()" dance).
|
||||
|
||||
I suspect (but have not yet determined conclusively) this is the cause
|
||||
of some systemd build issues where translations don't appear in the
|
||||
merged file.
|
||||
|
||||
Regardless, this patch can't hurt.
|
||||
---
|
||||
intltool-merge.in | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/intltool-merge.in b/intltool-merge.in
|
||||
index 1afa2a4..d1eba8f 100644
|
||||
--- a/intltool-merge.in
|
||||
+++ b/intltool-merge.in
|
||||
@@ -371,9 +371,10 @@ sub create_cache
|
||||
|
||||
&create_translation_database;
|
||||
|
||||
- open CACHE, ">$cache_file" || die;
|
||||
+ open CACHE, ">$cache_file" . ".tmp" || die;
|
||||
print CACHE join "\x01", %translations;
|
||||
close CACHE;
|
||||
+ rename("$cache_file" . ".tmp", "$cache_file");
|
||||
}
|
||||
|
||||
sub load_cache
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
Name: intltool
|
||||
Summary: Utility for internationalizing various kinds of data files
|
||||
Version: 0.51.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2 with exceptions
|
||||
Group: Development/Tools
|
||||
#VCS: bzr:https://code.edge.launchpad.net/~intltool/intltool/trunk
|
||||
@ -21,6 +21,9 @@ BuildRequires: gettext
|
||||
# which has a sensible gettext integration.
|
||||
#Patch0: schemas-merge.patch
|
||||
Patch1: intltool-0.51.0-perl-5.22.patch
|
||||
# https://bugs.launchpad.net/intltool/+bug/1505260
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1249051
|
||||
Patch2: intltool-merge-Create-cache-file-atomically.patch
|
||||
|
||||
%description
|
||||
This tool automatically extracts translatable strings from oaf, glade,
|
||||
@ -30,6 +33,7 @@ them in the po files.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -51,6 +55,10 @@ make check
|
||||
%{_mandir}/man8/intltool*.8*
|
||||
|
||||
%changelog
|
||||
* Mon Oct 12 2015 Colin Walters <walters@redhat.com> - 0.51.0-4
|
||||
- Add patch to hopefully close race condition in systemd builds
|
||||
- Related to https://bugzilla.redhat.com/show_bug.cgi?id=1249051
|
||||
|
||||
* Mon Jul 13 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.51.0-3
|
||||
- Add intltool-0.51.0-perl-5.22.patch (Address RHBZ#1233444)
|
||||
- Remove unnecessary %%debug_package.
|
||||
|
Loading…
Reference in New Issue
Block a user