less's update to 481 in 10.3-RELEASE causes more compatibility more to page output when you reach EOF: ... - In more-compatible mode, change the -e option to work like -E, not -EF. ... This didn't happen in <10.3 running freebsd-update without when nothing was to be updated. less when ran in more compatibility without -e applies as if -e was used. freebsd-update sends all output to a $PAGER (by default - more) by piping a sh if to $PAGER: if .... fi | $PAGER I don't think less should change for this (or if it's even a bug in less). Should freebsd-update to not pipe if's contents but rather a grouped { ... ; } output inside the if block: ... # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then { echo echo -n "The following files are affected by updates, " echo "but no changes have" echo -n "been downloaded because the files have been " echo "modified locally:" cat modifiedfiles; } | $PAGER fi ... I believe that's the way PAGER is used in all of freebsd-update. If so should the attached patch fix this? PS: I hit return in the subject when I first reported this bug hence the empty comment.
Created attachment 168951 [details] page the contents of a group not all of the if page the contents of a group not all of the if. That way we only page when we have to.
I do not like that now "more -e" behaves like "more -E" used to. I have "-e" in $MORE for ages.
(In reply to Andriy Gapon from comment #3) Yes this was in discussion at late release cycle and I actually have a patch to address it: Index: main.c =================================================================== --- main.c (revision 296979) +++ main.c (working copy) @@ -57,6 +57,7 @@ static char consoleTitle[256]; extern int less_is_more; extern int missing_cap; extern int know_dumb; +extern int quit_if_one_screen; extern int no_init; extern int pr_type; @@ -166,6 +167,8 @@ main(argc, argv) if (less_is_more) no_init = TRUE; + if (less_is_more) + quit_if_one_screen = TRUE; #if EDITOR editor = lgetenv("VISUAL"); The author have indicated that it was intentional and cited it was a POSIX behavior (http://www.unix.com/man-page/posix/1p/more/) which I haven't investigated further yet (OpenBSD behavior change was their main.c,v 1.14 at http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/less/main.c).
A commit references this bug: Author: emaste Date: Thu Jan 24 18:26:31 UTC 2019 New revision: 343407 URL: https://svnweb.freebsd.org/changeset/base/343407 Log: freebsd-update: open $PAGER only if necessary PR: 194547, 208497 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reviewed by: delphij MFC after: 1 month Sponsored by: The FreeBSD Foundation Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
https://reviews.freebsd.org/D18913
A commit references this bug: Author: ngie Date: Thu Jan 24 20:35:59 UTC 2019 New revision: 343412 URL: https://svnweb.freebsd.org/changeset/base/343412 Log: Fix a typo/wordsmith a description modified in r343407 r343407 accidentally introduced a typo (folling -> following). While reading the change out loud, I realized that the original sentence was wordy. almost sounding like a run-on sentence. Improve the flow by splitting up the two thoughts into two distinct sentence fragments. PR: 194547, 208497 Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 month MFC with: r343407 Differential Revision: https://reviews.freebsd.org/D18947 Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Tue Mar 5 18:19:27 UTC 2019 New revision: 344803 URL: https://svnweb.freebsd.org/changeset/base/344803 Log: MFC r343407: freebsd-update: open $PAGER only if necessary PR: 194547, 208497 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reviewed by: delphij Sponsored by: The FreeBSD Foundation Changes: _U stable/12/ stable/12/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Tue Mar 5 18:20:17 UTC 2019 New revision: 344804 URL: https://svnweb.freebsd.org/changeset/base/344804 Log: MFC r343407: freebsd-update: open $PAGER only if necessary PR: 194547, 208497 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reviewed by: delphij Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/usr.sbin/freebsd-update/freebsd-update.sh