All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] less: set PAGER variable
@ 2019-09-02 13:39 Lubomir Rintel
  2019-09-03  8:38 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Lubomir Rintel @ 2019-09-02 13:39 UTC (permalink / raw)
  To: buildroot

The system/skeleton/etc/profile sets PAGER to /bin/more. Not sure why,
but this defeats pager autodetection by various tool (systemctl, nmcli,
etc.) that would otherwise prefer less to more.

Let's override the PAGER variable if the user chooses to install the less
package.
---
 package/less/less.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/less/less.mk b/package/less/less.mk
index ef3643c0aa..1981e4b8b6 100644
--- a/package/less/less.mk
+++ b/package/less/less.mk
@@ -12,6 +12,8 @@ LESS_DEPENDENCIES = ncurses
 
 define LESS_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less
+	mkdir -p $(TARGET_DIR)/etc/profile.d
+	echo "export PAGER='/bin/less'" > $(TARGET_DIR)/etc/profile.d/less.sh
 endef
 
 $(eval $(autotools-package))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] less: set PAGER variable
  2019-09-02 13:39 [Buildroot] [PATCH] less: set PAGER variable Lubomir Rintel
@ 2019-09-03  8:38 ` Thomas Petazzoni
  2019-09-06  9:24   ` Lubomir Rintel
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2019-09-03  8:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  2 Sep 2019 15:39:55 +0200
Lubomir Rintel <lkundrak@v3.sk> wrote:

> The system/skeleton/etc/profile sets PAGER to /bin/more. Not sure why,
> but this defeats pager autodetection by various tool (systemctl, nmcli,
> etc.) that would otherwise prefer less to more.

Perhaps we should simply remove the PAGER definition in etc/profile, then ?

In any case, your patch lacks an SoB.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] less: set PAGER variable
  2019-09-03  8:38 ` Thomas Petazzoni
@ 2019-09-06  9:24   ` Lubomir Rintel
  0 siblings, 0 replies; 3+ messages in thread
From: Lubomir Rintel @ 2019-09-06  9:24 UTC (permalink / raw)
  To: buildroot

On Tue, 2019-09-03 at 10:38 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon,  2 Sep 2019 15:39:55 +0200
> Lubomir Rintel <lkundrak@v3.sk> wrote:
> 
> > The system/skeleton/etc/profile sets PAGER to /bin/more. Not sure why,
> > but this defeats pager autodetection by various tool (systemctl, nmcli,
> > etc.) that would otherwise prefer less to more.
> 
> Perhaps we should simply remove the PAGER definition in etc/profile, then ?

That indeed seems to be a better idea.

> In any case, your patch lacks an SoB.
> 
> Thanks,
> 
> Thomas

Thanks
Lubo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-06  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 13:39 [Buildroot] [PATCH] less: set PAGER variable Lubomir Rintel
2019-09-03  8:38 ` Thomas Petazzoni
2019-09-06  9:24   ` Lubomir Rintel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.