Comment 15 for bug 833101

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

PAGER is for customisation. A package which might not work if PAGER is not set is a broken package.

However, the proposed change (http://git.linaro.org/gitweb?p=people/ynk/linux-linaro-tracking.git;a=commit;h=49561d58a14351d136518f25bd686f9a6ca41b69) has some problems. In particular, it will mess up PATH in the environment, because strtok() causes the string it is used on to be modified. Since perf runs other subprocesses, this may lead to problems.

Why don't we just use /usr/bin/pager as the default? This is the whole point of the Debian alternatives system.

So:

If PAGER is set, try use its value. Don't bother to search: it's up to the user to specify sensible preferences.

Otherwise, if /usr/bin/pager exists, use that.

Otherwise, fall back to the legacy behaviour (i.e., try to run "less"). This should work just fine for the non-Debian folks.

Cheers
---Dave