commit 6608973bee4ad6e58973f904f17263dff29fbf8c
Author: Jan RÄ™korajski <[email protected]>
Date:   Tue Aug 13 20:09:23 2013 +0200

    - make sure that the output buffer gets truncated after use, otherwise
      new output will be appended to it and it all being printed each time

 rpm-5.4.12-truncate-output-buffer-after-use.patch | 11 +++++++++++
 rpm.spec                                          |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/rpm.spec b/rpm.spec
index 68db431..12c4b1b 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -270,6 +270,7 @@ Patch1042:  %{name}-5.4.9-fix-rpm_qa-pattern.patch
 Patch1043:     %{name}-5.4.12-copy-Value-string.patch
 Patch1044:     %{name}-5.4.12-fix-rpmlua-print.patch
 Patch1045:     %{name}-5.4.12-fix-rpmpython-module-import-init.patch
+Patch1046:     %{name}-5.4.12-truncate-output-buffer-after-use.patch
 
 URL:           http://rpm5.org/
 BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver}
@@ -945,6 +946,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML 
generowane ze
 %patch1043 -p1
 %patch1044 -p1
 %patch1045 -p1
+%patch1046 -p1
 %patch68 -p1
 %patch69 -p1
 
diff --git a/rpm-5.4.12-truncate-output-buffer-after-use.patch 
b/rpm-5.4.12-truncate-output-buffer-after-use.patch
new file mode 100644
index 0000000..ff3b418
--- /dev/null
+++ b/rpm-5.4.12-truncate-output-buffer-after-use.patch
@@ -0,0 +1,11 @@
+--- rpm-5.4.12/rpmio/rpmpython.c.rpmpythontrunc~       2013-08-09 
03:05:39.809947086 +0200
++++ rpm-5.4.12/rpmio/rpmpython.c       2013-08-09 03:25:25.097372593 +0200
+@@ -229,6 +229,8 @@ fprintf(stderr, "==> %s(%p,%s,%p)\n", __
+               if (sys_stdout != NULL && PycStringIO_OutputCheck(sys_stdout)) {
+                   PyObject * o = (*PycStringIO->cgetvalue)(sys_stdout);
+                   *resultp = (PyString_Check(o) ? PyString_AsString(o) : "");
++                  PyObject_CallMethod(sys_stdout, "seek", "i",0);
++                  PyObject_CallMethod(sys_stdout, "truncate", NULL);
+               } else
+                   *resultp = "";
+           }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/f12f8a526cb287a152637d49fc4faa6d41ae3a14

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to