]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- make sure that the output buffer gets truncated after use, otherwise
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 13 Aug 2013 18:09:23 +0000 (20:09 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 13 Aug 2013 18:09:23 +0000 (20:09 +0200)
  new output will be appended to it and it all being printed each time

rpm-5.4.12-truncate-output-buffer-after-use.patch [new file with mode: 0644]
rpm.spec

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 (file)
index 0000000..ff3b418
--- /dev/null
@@ -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 = "";
+           }
index 68db43181f310b9e4ceed651a87e3c2ca94c4316..12c4b1bf0cbf842aa899b06ed9feea0077e66588 100644 (file)
--- 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
 
This page took 0.037603 seconds and 4 git commands to generate.