]> git.pld-linux.org Git - packages/python-pygtail.git/commitdiff
- rel 2; fixes a case when offset gets current file inode number incorrectly auto/th/python-pygtail-0.8.0-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 5 Apr 2018 07:28:34 +0000 (09:28 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 5 Apr 2018 07:28:34 +0000 (09:28 +0200)
python-pygtail-bug-38.patch [new file with mode: 0644]
python-pygtail.spec

diff --git a/python-pygtail-bug-38.patch b/python-pygtail-bug-38.patch
new file mode 100644 (file)
index 0000000..0b18c4a
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN pygtail-0.8.0.org/pygtail/core.py pygtail-0.8.0/pygtail/core.py
+--- pygtail-0.8.0.org/pygtail/core.py  2018-03-10 17:34:16.000000000 +0100
++++ pygtail-0.8.0/pygtail/core.py      2018-04-05 09:26:52.894624325 +0200
+@@ -182,7 +182,7 @@
+         if self.on_update:
+             self.on_update()
+         offset = self._filehandle().tell()
+-        inode = stat(self.filename).st_ino
++        inode = fstat(self._filehandle().fileno()).st_ino
+         fh = open(self._offset_file, "w")
+         fh.write("%s\n%s\n" % (inode, offset))
+         fh.close()
index 35a79a555fb83c82e534ec4fb4bb975571d2923d..46cbc8221e6ef77eda4ef214d6d08e700e792f40 100644 (file)
@@ -9,11 +9,12 @@
 Summary:       Reads log file lines that have not been read
 Name:          python-%{pypi_name}
 Version:       0.8.0
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Libraries/Python
 Source0:       https://github.com/bgreenlee/pygtail/archive/%{version}.tar.gz
 # Source0-md5: 504ffc804e83a4dd09e20546990b1d43
+Patch0:                python-pygtail-bug-38.patch
 URL:           https://github.com/bgreenlee/pygtail
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
@@ -45,6 +46,8 @@ handle log files that have been rotated.
 
 %prep
 %setup -q -n %{pypi_name}-%{version}
+%patch0 -p1
+
 sed -i -e 's#0\.7\.0#0\.8\.0#g' pygtail/core.py
 
 %build
This page took 0.179763 seconds and 4 git commands to generate.