From fb07233b044ee9b65d5a0b227da4d2fc0ca30697 Mon Sep 17 00:00:00 2001 From: Thomas Hurst Date: Fri, 29 Oct 2021 09:40:05 -0700 Subject: [PATCH] sysutils/lnav: Update to 0.10.1 PR: 258847 --- sysutils/lnav/Makefile | 2 +- sysutils/lnav/distinfo | 6 ++-- sysutils/lnav/files/patch-src_logfile.cc | 37 ------------------------ 3 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 sysutils/lnav/files/patch-src_logfile.cc diff --git a/sysutils/lnav/Makefile b/sysutils/lnav/Makefile index e06fb260aa31..261dcb49d4f4 100644 --- a/sysutils/lnav/Makefile +++ b/sysutils/lnav/Makefile @@ -1,7 +1,7 @@ # Created by: Thomas Hurst PORTNAME= lnav -PORTVERSION= 0.9.0 +PORTVERSION= 0.10.1 CATEGORIES= sysutils MASTER_SITES= https://github.com/tstack/${PORTNAME}/releases/download/v${PORTVERSION}/ diff --git a/sysutils/lnav/distinfo b/sysutils/lnav/distinfo index ea3eae7852ad..e412e2345480 100644 --- a/sysutils/lnav/distinfo +++ b/sysutils/lnav/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1601099244 -SHA256 (lnav-0.9.0.tar.bz2) = 9ba2c9c745d1479ec0eed0201cba7fdb223fc0489c50b20a54af3d2a1b2ae550 -SIZE (lnav-0.9.0.tar.bz2) = 877288 +TIMESTAMP = 1633398666 +SHA256 (lnav-0.10.1.tar.bz2) = 3bb0fb4f36efc1b83f082b0a232fd4495fc78dcf552424afcb0297d21613b3a7 +SIZE (lnav-0.10.1.tar.bz2) = 1400364 diff --git a/sysutils/lnav/files/patch-src_logfile.cc b/sysutils/lnav/files/patch-src_logfile.cc deleted file mode 100644 index fbad7c3c686e..000000000000 --- a/sysutils/lnav/files/patch-src_logfile.cc +++ /dev/null @@ -1,37 +0,0 @@ ---- src/logfile.cc.orig 2020-09-09 16:17:12 UTC -+++ src/logfile.cc -@@ -323,10 +323,13 @@ logfile::rebuild_result_t logfile::rebuild_index() - - this->lf_line_buffer.clear(); - if (!this->lf_index.empty()) { -- off_t check_line_off = this->lf_index.back().get_offset(); -+ auto last_line = this->lf_index.end(); -+ --last_line; -+ off_t check_line_off = last_line->get_offset(); -+ auto last_length = ssize_t(this->line_length(last_line, false)); - - auto read_result = this->lf_line_buffer.read_range({ -- check_line_off, this->lf_index_size - check_line_off -+ check_line_off, last_length - }); - - if (read_result.isErr()) { -@@ -553,7 +556,7 @@ filesystem::path logfile::get_path() const - - size_t logfile::line_length(logfile::iterator ll, bool include_continues) - { -- iterator next_line = ll; -+ auto next_line = ll; - size_t retval; - - if (!include_continues && this->lf_next_line_cache) { -@@ -570,6 +573,9 @@ size_t logfile::line_length(logfile::iterator ll, bool - - if (next_line == this->end()) { - retval = this->lf_index_size - ll->get_offset(); -+ if (retval > line_buffer::MAX_LINE_BUFFER_SIZE) { -+ retval = line_buffer::MAX_LINE_BUFFER_SIZE; -+ } - if (retval > 0 && !this->lf_partial_line) { - retval -= 1; - }