[Bug 208497] less in 10.3-RELEASE in more compatibility mode cause freebsd-update to page when it shouldn't

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 4 06:05:15 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208497

dereks at lifeofadishwasher.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://www.greenwoodsoftwar
                   |                            |e.com/less/news.481.html

--- Comment #1 from dereks at lifeofadishwasher.com ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list