diff options
author | Sam James <sam@gentoo.org> | 2023-02-09 03:54:01 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-09 03:54:10 +0000 |
commit | 795576427d6297dd5b813c65261965e190766e22 (patch) | |
tree | b68ae8daab0faddd3a5978983f694d7f0d895fd2 /sys-apps/util-linux/files | |
parent | sys-apps/less: add 623_beta (unkeyworded) (diff) | |
download | gentoo-795576427d6297dd5b813c65261965e190766e22.tar.gz gentoo-795576427d6297dd5b813c65261965e190766e22.tar.bz2 gentoo-795576427d6297dd5b813c65261965e190766e22.zip |
sys-apps/util-linux: backport fix for 'more' exit
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/util-linux/files')
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.38.1-more-posix-exit-on-eof.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.38.1-more-posix-exit-on-eof.patch b/sys-apps/util-linux/files/util-linux-2.38.1-more-posix-exit-on-eof.patch new file mode 100644 index 000000000000..07d158761c26 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.38.1-more-posix-exit-on-eof.patch @@ -0,0 +1,32 @@ +https://forums.gentoo.org/viewtopic-t-1160959.html +https://github.com/util-linux/util-linux/issues/1703 +https://github.com/util-linux/util-linux/commit/28b391ce7e58f8327c092b3911c05f526d0ad586 + +From 28b391ce7e58f8327c092b3911c05f526d0ad586 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Wed, 15 Jun 2022 10:03:44 +0200 +Subject: [PATCH] more: restore exit-on-eof if POSIXLY_CORRECT is not set + +In version 2.38, exit-on-eof has been disabled by default. This change +is annoying for users and forces many users to use 'alias more="more +-e"'. It seems better to force POSIX lovers to use POSIXLY_CORRECT +env. variable and stay backwardly compatible by default. + +Addresses: https://github.com/util-linux/util-linux/issues/1703 +Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2088493 +Signed-off-by: Karel Zak <kzak@redhat.com> +--- a/text-utils/more.c ++++ b/text-utils/more.c +@@ -2052,8 +2052,11 @@ int main(int argc, char **argv) + if (!(strcmp(program_invocation_short_name, "page"))) + ctl.no_scroll++; + ++ ctl.exit_on_eof = getenv("POSIXLY_CORRECT") ? 0 : 1; ++ + if ((s = getenv("MORE")) != NULL) + env_argscan(&ctl, s); ++ + argscan(&ctl, argc, argv); + + /* clear any inherited settings */ + |