Hello community,

here is the log from the commit of package intltool for openSUSE:Factory 
checked in at 2017-05-18 20:39:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/intltool (Old)
 and      /work/SRC/openSUSE:Factory/.intltool.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "intltool"

Thu May 18 20:39:23 2017 rev:33 rq:494341 version:0.51.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/intltool/intltool.changes        2016-09-05 
21:10:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.intltool.new/intltool.changes   2017-05-18 
20:39:26.058501163 +0200
@@ -1,0 +2,6 @@
+Tue May  2 15:22:35 UTC 2017 - bwiedem...@suse.com
+
+- Add fixrace.patch to fix random desktop file corruptions
+  (lp#1687644 boo#1021335)
+
+-------------------------------------------------------------------

New:
----
  fixrace.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ intltool.spec ++++++
--- /var/tmp/diff_new_pack.1Wyf8u/_old  2017-05-18 20:39:28.010225730 +0200
+++ /var/tmp/diff_new_pack.1Wyf8u/_new  2017-05-18 20:39:28.010225730 +0200
@@ -32,6 +32,8 @@
 Source:         
https://launchpad.net/%{name}/trunk/%{version}/+download/%{name}-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM intltool-perl-5.22.patch lp#1490906 dims...@opensuse.org 
-- Fix execution with perl 5.22
 Patch0:         intltool-perl-5.22.patch
+# PATCH-FIX-UPSTREAM fixrace.patch lp#1687644 boo#1021335
+Patch1:         fixrace.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -43,6 +45,7 @@
 %prep
 %setup -q
 %patch0 -p0
+%patch1 -p1
 
 %build
 %configure

++++++ fixrace.patch ++++++
From: Bernhard M. Wiedemann <bmwiedemann+intlt...@suse.de>

avoid a race where some processes try to use a partial cache file
that is still being written to.
Note that we release the lock before load_cache,
because if we got the lock, the cache is already completely written
and it is OK to have multiple parallel readers

Index: intltool-0.51.0/intltool-merge.in
===================================================================
--- intltool-0.51.0.orig/intltool-merge.in
+++ intltool-0.51.0/intltool-merge.in
@@ -43,6 +43,7 @@ use Getopt::Long;
 use Text::Wrap;
 use File::Basename;
 use Encode;
+use Fcntl qw(:flock);
 
 my $must_end_tag      = -1;
 my $last_depth        = -1;
@@ -392,11 +393,14 @@ sub load_cache
 
 sub get_cached_translation_database
 {
+    open(my $lockfh, ">", "$cache_file.lock") or die $!;
+    flock($lockfh, LOCK_EX) or die "Could not lock '$cache_file.lock' - $!";
     my $cache_file_age = -M $cache_file;
     if (defined $cache_file_age) 
     {
         if ($cache_file_age <= &get_newest_po_age) 
         {
+            close($lockfh);
             &load_cache;
             return;
         }
@@ -404,6 +408,7 @@ sub get_cached_translation_database
     }
 
     &create_cache;
+    close($lockfh);
 }
 
 sub add_translation

Reply via email to