[yum-langpacks/f16] Handle bad interaction with yum -C; use uncompressed comps file if it exists (#758574, <zpavlas at redh

Bill Nottingham notting at fedoraproject.org
Thu Dec 15 19:17:01 UTC 2011


commit 764826c586ee1f6e6c12860ca12cc2ac0679a5fb
Author: Bill Nottingham <notting at redhat.com>
Date:   Thu Dec 15 14:16:16 2011 -0500

    Handle bad interaction with yum -C; use uncompressed comps file if it exists (#758574, <zpavlas at redhat.com>)

 ...lready-decompressed-comps-file.-BZ-758574.patch |   28 ++++++++++++++++++++
 yum-langpacks.spec                                 |    8 ++++-
 2 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/0001-Use-the-already-decompressed-comps-file.-BZ-758574.patch b/0001-Use-the-already-decompressed-comps-file.-BZ-758574.patch
new file mode 100644
index 0000000..493d561
--- /dev/null
+++ b/0001-Use-the-already-decompressed-comps-file.-BZ-758574.patch
@@ -0,0 +1,28 @@
+From 2efff7a416a4636b00c25d02592a5d8e3920755f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zden=C4=9Bk=20Pavlas?= <zpavlas at redhat.com>
+Date: Thu, 15 Dec 2011 11:53:28 +0100
+Subject: [PATCH] Use the already decompressed comps file.  BZ 758574.
+
+Instead of decompressing the file every time check
+if decompressed version exists.  It's faster and
+avoids possible EPERM on write with --cacheonly.
+---
+ langpacks.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/langpacks.py b/langpacks.py
+index b147d59..6a58a7c 100644
+--- a/langpacks.py
++++ b/langpacks.py
+@@ -75,7 +75,7 @@ def postreposetup_hook(conduit):
+ 
+         if not infile:
+             continue
+-        infile = yum.misc.decompress(infile)
++        infile = yum.misc.decompress(infile, check_timestamps=True)
+         for event, elem in iterparse(infile):
+             if elem.tag == "langpacks":
+                 for child in elem.getchildren():
+-- 
+1.7.4.4
+
diff --git a/yum-langpacks.spec b/yum-langpacks.spec
index 28eca90..50b3932 100644
--- a/yum-langpacks.spec
+++ b/yum-langpacks.spec
@@ -3,7 +3,7 @@
 Summary: Langpacks plugin for yum
 Name: yum-langpacks
 Version: 0.2.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: Development/Tools
 Source0: http://petersen.fedorapeople.org/%{name}/%{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 BuildRequires: python-setuptools
 Requires: yum >= 3.0
+Patch0: 0001-Use-the-already-decompressed-comps-file.-BZ-758574.patch
 
 %description
 Yum-langpacks is a plugin for YUM that looks for langpacks for your native
@@ -19,7 +20,7 @@ language for packages you install.
 
 %prep
 %setup -q
-
+%patch0 -p1
 %build
 
 %install
@@ -36,6 +37,9 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/langpacks.conf
 
 %changelog
+* Thu Dec 15 2011 Bill Nottingham <notting at redhat.com> - 0.2.4-2
+- fix bad interaction with -C (#758574, <zpavlas at redhat.com>)
+
 * Wed Oct 26 2011 Bill Nottingham <notting at redhat.com> - 0.2.4-1
 - don't crash when there are no groups (#749108)
 


More information about the scm-commits mailing list